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

Won't take money form my character?

Button = script.Parent
Price = script.Parent.Parent.Adornee.Parent.Register.MoneyCharged
Money = script.Parent.Parent.Parent.Parent.Money
Button.MouseButton1Down:connect(function()
 Money.Value = Money.Value - Price.Value
end)

(It's in stratergui too)

2 comments

1

All the those Parent maybe is cause of problem. I wonder if you could post a picture of the location of all the "Objects" your using in your script. It might help me to solve the problem your having.

1

Yes, the paths are probably wrong, or something.

1 answer

Make sure that the Price and Money variables contain what you think they contain. Use something like this:

print("Price",Price)
print("Money",Money)

One or both of those is likely nil which means that the paths you specified in setting those variables is inaccurate.

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