不知道为什么
orestring
没有改变
当我在脚本 print(Orestring.Value) 中写入时,它通常可以工作,它表示 orestring
中应该包含什么,但 orestring
不会改变
local proximityprompt = game.Workspace.Tycoons.Tycoon.MainItems.Cardboard_Box.Box.ProximityPrompt
local StorageGui = script.Parent
local x = script.Parent.Storage.Frame.X
local Orebuttons = script.Parent.Storage.Frame.Ores:GetChildren()
local OreString = script.Parent.Parent.Sell.Frame.Ore
proximityprompt.Triggered:Connect(function()
StorageGui.Visible = true
end)
x.MouseButton1Click:Connect(function()
StorageGui.Visible = false
end)
for _, button: GuiButton in pairs(Orebuttons) do
if button:IsA("GuiButton") then
button.MouseButton1Click:Connect(function()
OreString.Value = button.Name
end)
end
end
这是脚本(This script)和矿石串(Ore)的路径