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

DataStore for values(int,bool,etc.) not working through GUI?

Asked by 5 years ago
script.Parent.Frame.Purchase.Purchase.MouseButton1Click:Connect(function()
        if game.Players.LocalPlayer.Stats.ShirtStats.BasicShirt.Value == false then
            if game.Players.LocalPlayer.Stats.Coins.Value >= 0 then
                game.Players.LocalPlayer.Stats.Coins.Value = game.Players.LocalPlayer.Stats.Coins.Value + 100           
                script.Parent.Frame.Purchase.Purchase.Text = "Purchased"
            end
        else
        end
    end)

API is on, LocalScript in a GUI. When you click the purchase button, it does change the value, until you leave. When you leave, it goes back to the previous value.

1
First thing... It needs to be from regular script.... Second thing.... We need to see your code for your localscript, third thing, I recommend using remote events.... greatneil80 2647 — 5y

Answer this question