✓ Accepted answer
Hi darkblooood,
The solution to your question is a simple one. You set a variable to the amount of tickets, instead of doing that, you need to set it to the value and then get the amount later so it gets updated each time. It may sound complicated but, it's not. You basically made the variable equal to a number, and you didn't change the variable since so it's going to keep thinking the variable's less than 21, since it is. Here, this is what you're basically doing.
####Assuming the tix value at first is 0, and then it slowly becomes 21 somehow.
local tickets = 0;
script.Parent.MouseButton1Click:connect(function()
if tickets < 21 then
end
end)
##Here is how it should be:
local tickets = game.Players.LocalPlayer.Data.tix
local rbux = game.Players.LocalPlayer.Data.robux
script.Parent.MouseButton1Click:connect(function()
if tickets.Value < 21 then
print("no u")
else if tickets.Value >= 21 then
tickets = tickets - 21
rbux.Value = rbux.Value + 1
end
end
end)
##Well, I hope I helped. I know it may seem a bit complicated but believe me, it's really not.
Thanks,
Best regards,
~~ KingLoneCat
2 comments
AYYYYYYYYYY LONE CATTTTTT!!!!! HAI MY DUUDE
What's up?