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 » Scripting Helpers
Home Search
 

Re: HELP! D:

Previous Thread :: Next Thread 
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
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 is not online. 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
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
14 Apr 2012 08:09 PM
Could you re-do the script?
As you can see I'm not very goood...
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
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 is not online. 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 is not online. 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
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
14 Apr 2012 08:17 PM
@C0d3y

He's not trying to change the T-shirt and Walkspeed...

† KMXD †
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
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 is not online. 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
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
15 Apr 2012 03:43 PM
Thank you for your generous help, I will go and test the script! Thanks!
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
15 Apr 2012 03:51 PM
It did not work could you show me the correct script?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
15 Apr 2012 03:57 PM
do:

human = newPlayer.Character.Humanoid
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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