I have tried to make a surfacegui shop but when you click the buy button nothing happens. My script is a LocalScript, but even in a normal script using PlayerAdded it doesn't work.
script.Parent.TextButton.MouseButton1Click:Connect(function() local plr = game.Players.LocalPlayer local points = plr.leaderstats.Points if points.Value > 24 then print("Purchased!") game.ReplicatedStorage.RemoteEvent:FireServer() else print("Not enough") end end)