--The LocalScript must be parented inside StarterPlayer.StarterPlayerScripts to function properly, unless the code is modified.

local LocalScript = script.Parent 
LocalScript.Parent = game.StarterPlayer.StarterPlayerScripts