wait() script.Parent.Text = "Gems: " .. game.Players.LocalPlayer.Gems.Value
ok, this is how I did points for my game: you have to do this: also, make sure that "Gems" is in starter player then
while true do: script.Parent.Text - "Gems: " .. game.Players.LocalPlayer.Gems.Value wait() -- try adding a wait, that might clear it up end
I think you would be better off just checking whenever the value changes, perhaps like this
game.Players.LocalPlayer.Gems.Changed:Connect(function() script.Parent.Text = "Gems: " .. game.Players.LocalPlayer.Gems.Value end)
I'm on mobile so it might not be exactly right but hopefully you get the idea
The reason it crashes when you use a while loop is because you need a wait() when using it.
while true do wait() script.Parent.Text = "Gems: "..game.Players.LocalPlayer.Gems.Value end
Though I'd just detect whenever the value is changed then change the text.
game.Players.LocalPlayer.Gems:GetPropertyChangedSignal("Value"):Connect(function() -- Or, if you wanted to, you could just do the .Changed event. script.Parent.Text = "Gems: "..game.Players.LocalPlayer.Gems.Value end)