generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Attempt to index 'Character' a nil value

Previous Thread :: Next Thread 
hurriedsonic123456 is not online. hurriedsonic123456
Joined: 20 Feb 2011
Total Posts: 198
30 Jun 2015 10:51 PM
game.Players.PlayerAdded:connect(function(player)
for _,p in pairs(game.Players:GetChildren()) do

p.Character.Humanoid.Walkspeed.Value = player.Character.Humanoid.Walkspeed.Value
- 16
end
end)
Report Abuse
kert109 is not online. kert109
Joined: 31 Dec 2009
Total Posts: 681
30 Jun 2015 10:53 PM


game.Players.PlayerAdded:connect(function(player)
for _,p in pairs(game.Players:GetChildren()) do

repeat wait() until p.Character ~= nil


p.Character.Humanoid.Walkspeed.Value = player.Character.Humanoid.Walkspeed.Value
- 16
end
end)
Report Abuse
iamsmartcookie is not online. iamsmartcookie
Joined: 18 Aug 2012
Total Posts: 2738
30 Jun 2015 10:54 PM
game.Players.PlayerAdded:connect(function(player)
for _,p in pairs(game.Players:GetChildren()) do

p.Character.Humanoid.WalkSpeed = player.Character.Humanoid.WalkSpeed - 16
end
end)

uh >.> why not just do

game.Players.PlayerAdded:connect(function(p)
p.Character.Humanoid.WalkSpeed = 0
end)
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
30 Jun 2015 10:58 PM
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
c:WaitForChild("Humanoid").WalkSpeed = 0
end)
end)
Report Abuse
hurriedsonic123456 is not online. hurriedsonic123456
Joined: 20 Feb 2011
Total Posts: 198
30 Jun 2015 11:09 PM
Well kert,you've won a prize!
With a tiny tiny bit of edits your script helped me
Thanks to all who replied
here's the winnah

game.Players.PlayerAdded:connect(function(player)
for _,p in pairs(game.Players:GetChildren()) do

repeat wait() until p.Character ~= nil


p.Character.Humanoid.WalkSpeed = 0
end
end)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image