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 comment

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....