Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Bill.Value = SurfaceGui.Text Help?

Off of a few threads. I've come to this. I still need help though.

Basically when you select the tool and click on this brick with the code in it (below) it changes the Value of a NumberValue called "Bill" inside the brick. When the value is changed the SurfaceGui Text changes to the Value. But the problem is, it's not working. Help?

Output - 21:42:49.790 - Equipped is not a valid member of Part 21:42:49.792 - Script 'Workspace.Sign10.Main.Script', Line 4

Current Script: local bill = script.Parent.Bill local surfacegui = script.Parent.SurfaceGui.TextLabel

script.Parent.Equipped:connect(function(m) surfacegui.Text = ("$"..tostring(bill.Value)) end)

1 answer

Whatever you're trying to equip cannot be equipped. You're referencing the part instead of the tool itself. The part must be inside a "Tool". And the script itself should just be another child of the Tool. Here's the script assigned to equip the tool itself in those conditions:

local bill = script.Parent.Bill local surfacegui = script.Parent.SurfaceGui.TextLabel

script.Parent.Equipped:connect(function(m) surfacegui.Text = ("$" .. bill.Value)

end)

1 comment

0

FYI: That will change the value upon equip, not when you click something. Atleast this piece of code alone would.

This discussion is preserved as it was. New answers, comments, and votes are closed.