I've seen multiple scripts use the parameter "player" to access the Local Player easily, without need of a local script. I tried to use it myself. But with my luck it didn't work. This is what I tried:
function added(player)
player.Character.Humanoid.WalkSpeed = 0
end
game.Players.PlayerAdded:connect(added)
Not sure why it didn't work, and every time I test it the output displays either: Workspace.Script:2: attempt to index field 'player' (a nil value) or Workspace.Script:2: attempt to index field 'Character' (a nil value)
I have no idea why it's not working. I thought it might have been just an issue with ROBLOX Studio but to my surprise I inserted takecover's Intro Gui Plugin, a script that uses the "player" parameter, and it worked. Weird how it works in takecover's Plugin, but not my script. Any help would much appreciated. Thanks!

3 comments
This is in a localscript?
First you need a "CharacterAdded" example: player.CharacterAdded:connect(function(NAME HERE) right after the "Added" part.
Not in a local script. It's in a normal script in the workspace.