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
 

Script Help (Basic)

Previous Thread :: Next Thread 
Abillityx is not online. Abillityx
Joined: 26 Feb 2011
Total Posts: 3938
07 Apr 2012 07:21 PM
What I am trying to do is when a humanoid hits the brick, it's walkspeed becomes a value of 1 and after 5 seconds returns to 16. The output says nothing. Help?

print('Script V1.0 Loaded')
h = script.Parent:findFirstChild("Humanoid")
function onTouched(hit)
if h~=nil then
h.Walkspeed = 1
wait(5)
h.Walkspeed = 16
end
end
script.Parent.connect:onTouched
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
07 Apr 2012 07:38 PM
print('Haxxed by KnightmareXD')
 
script.Parent.Touched:connect(function(hit)
local h = script.Parent:FindFirstChild("Humanoid")
if h then
h.WalkSpeed = 1
wait(5)
h.WalkSpeed = 16
end
end)

† KMXD †
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