Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Won't take money form my character?

Asked by 9 years ago
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)

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. UserOnly20Characters 890 — 9y
1
Yes, the paths are probably wrong, or something. Perci1 4988 — 9y

1 answer

Log in to vote
0
Answered by
AxeOfMen 434 Moderation Voter
9 years ago

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.

Ad

Answer this question