This is what the output said: 09:54:33.332 - Players.tyorange09.PlayerGui.ScreenGui.StoneShardValue.Script:2: attempt to index nil with 'WaitForChild'
The issue here is that you are using a Script
and not a LocalScript
. Simply copy your code and put it inside a LocalScript and your code should work fine. The reason a LocalScript is needed is because regular scripts cannot access the LocalPlayer, which is why you get the error that player is nil.