|
| 14 Apr 2012 08:01 PM |
This is my script! If the persons wearing VIP it gives them a walkspeed boost.
function onPlayerEntered(newPlayer) texture = "http://www.roblox.com/asset/?id=69666503" local human = newPlayer:findFirstChild("Humanoid") if (human ~= nil ) then if human.Parent.Torso.roblox.Texture == texture then human.WalkSpeed = 20 print("Humanoid passed") end end end game.Players.PlayerAdded:connect(onPlayerEntered)
like the User doesnt have acces to the shirt ID... what? |
|
|
| Report Abuse |
|
|
C0D3Y
|
  |
| Joined: 24 Jul 2010 |
| Total Posts: 1692 |
|
|
| 14 Apr 2012 08:05 PM |
| When you use the PlayerAdded event, your argument/parameter(not sure the difference) is the PLAYER, not the character. So you would do newPlayer.Character:findFirstChild("Humanoid") But I would just add another event(newPlayer.CharacterAdded:connect(c)) and have c:findFirstChild("Humanoid") |
|
|
| Report Abuse |
|
|
|
| 14 Apr 2012 08:09 PM |
Could you re-do the script? As you can see I'm not very goood... |
|
|
| Report Abuse |
|
|
|
| 14 Apr 2012 08:12 PM |
texture = "http://www.roblox.com/asset/?id=69666503"
Game.Players.PlayerAdded:connect(function(newPlayer) newPlayer.CharacterAdded:connect(function(char) local human = char:FindFirstChild("Humanoid") if human then if human.Parent.Torso.roblox.Texture == texture then human.WalkSpeed = 20 print("Humanoid passed") end end end) end)
† KMXD † |
|
|
| Report Abuse |
|
|
C0D3Y
|
  |
| Joined: 24 Jul 2010 |
| Total Posts: 1692 |
|
|
| 14 Apr 2012 08:15 PM |
game.Players.PlayerAdded:connect(function(np) np.CharacterAdded:connect(function(c) h = c:findFirstChild("Humanoid") if h then c.Torso.roblox.Texture = "http://www.roblox.com/asset/?id=69666503" h.WalkSpeed = 20 print'Human Passed' end end) end)
Should do the trick... |
|
|
| Report Abuse |
|
|
C0D3Y
|
  |
| Joined: 24 Jul 2010 |
| Total Posts: 1692 |
|
|
| 14 Apr 2012 08:16 PM |
| Othx Knight... Now watch yours work and mine not. Stealing mah thunder... |
|
|
| Report Abuse |
|
|
|
| 14 Apr 2012 08:17 PM |
@C0d3y
He's not trying to change the T-shirt and Walkspeed...
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 14 Apr 2012 08:17 PM |
Watch both of ours fail. :P
Your's could work, but if it did, it wouldn't be the way the OP wants it.
† KMXD † |
|
|
| Report Abuse |
|
|
C0D3Y
|
  |
| Joined: 24 Jul 2010 |
| Total Posts: 1692 |
|
|
| 14 Apr 2012 08:24 PM |
Lol, forgot that it was checking for the shirt. Woops. Just add an if before that and a then after it and an extra end and you should be all set. But yea, watch Roblox make a new update where T-Shirts are now parented to something other than "roblox" in the torso... |
|
|
| Report Abuse |
|
|
|
| 15 Apr 2012 03:43 PM |
| Thank you for your generous help, I will go and test the script! Thanks! |
|
|
| Report Abuse |
|
|
|
| 15 Apr 2012 03:51 PM |
| It did not work could you show me the correct script? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 15 Apr 2012 03:57 PM |
do:
human = newPlayer.Character.Humanoid |
|
|
| Report Abuse |
|
|