I have this script, so that if any of the developers of my game join, they can walk very quickly. Here's what I have:
game.Players.PlayerAdded:Connect(function(plr) if plr.Name == "FlippinAwesomeCrew" or "SuperVenomSwag" or "poisonbcm" or "AnimalLover07013" then plr.Character.Humanoid.WalkSpeed = 50 end end)
When I run this though, it runs an error saying:
18:00:48.648 - Workspace.Script:3: attempt to index field 'Character' (a nil value)
Any idea what I'm doing wrong and how to fix it.
Thank you for your help, and even if you can't help, thank you for your time.
Much Appreciated
Hello, FlippinAwesomeCrew!
Basically what I did was make the server wait for the character and now it works!
game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function() if plr.Name == "FlippinAwesomeCrew" or "SuperVenomSwag" or "poisonbcm" or "AnimalLover07013" then plr.Character.Humanoid.WalkSpeed = 50 end end) end)
Good Luck with your games