So i wanna make a normal shop script, it worked when i set the points to the price the exact price, but not when i waited until the points got up to the price you had to pay.
Here's my code:
(In a LocalScript)
local money = game.StarterGui.CoreGui.ShopMenu.PlayerPoints.num
script.Parent.MouseButton1Click:Connect(function()
if tonumber(money.Text) >= 1500 then
workspace.PlanetPlacement.BillboardGui.Enabled = true
workspace.PlanetPlacement2.BillboardGui.Enabled = true
workspace.PlanetPlacement3.BillboardGui.Enabled = true
workspace.Planet.PlanetBall.BillboardGui.Enabled = true
money.Text = money.Text - 1500
print("Purchase Complete!")
end
end)
That's what i wrote. And when i set the points to 1500 manually, it worked; but when i waited until it got to 1500 points, i clicked a button which would run the script inside the function (at least that's what i thought) [Also the points went up +35 points every second in a while true do loop, i didn't set it to +1 point every second xD] and when i tried to do another if then statement when the player didn't have enough points, i used <= and when i tried it when the points were less than 1500, it said "Purchase Failed", like i wanted it to. And when i had +1500 points, it still said "Purchase Failed" And the same thing when i had enough points. What should i do??
Thx for ur help that you hopefully give me! LOL
~Chez_Guy
