I have looked at the other asks and saw the solution, however it does NOT work and I get the same error when trying to call localplayer! My localscript is in a gui button btw.
local players = game.Player.LocalPlayer
error: attempt to index localplayer(a nil value)

4 comments
HELP ME
You forgot the "s" at the end of game.Player. The player service is plural.
O yeah forget that I meant to put an S.... but still I dont know whats goin on...
you can only use
game.Players.LocalPlayeron a LocalScript.