I think this is a very obvious thing what this does, but apparently not. Multiple people use this wrong. It always get me confused and stuff why people do not understand this.
The error I see is using LocalPlayer on a serverscript. Here is an illustration of how the server would act.
It'd be really confused, as it does not know what player it is supposed to pick. However, localscripts can access this as it is a descendant of a player object.
Code cannot read your mind. That is why you have to type it all out. So, instead of doing
kick player with message saying haha i kicked you hacker
you'd have to do
game.Players.ARandomHacker:Kick('haha i kicked you hacker')
I hope this helps you, and if you see anyone using
LocalPlayer incorrectly, please use this short, understandable, tutorial.