BamRulez
|
  |
| Joined: 18 Sep 2010 |
| Total Posts: 239 |
|
|
| 11 Oct 2014 01:52 PM |
function onTouch(hit) local h = script.Parent:FindFirstChild("Humanoid") if h == nil then return end h.Walkspeed = 5 end script.Parent.Touched:connect(onTouch)
-- Is "Walkspeed" the correct term to change their speed?
|
|
|
| Report Abuse |
|
|
Verodoxys
|
  |
| Joined: 29 Jun 2012 |
| Total Posts: 18454 |
|
|
| 11 Oct 2014 01:54 PM |
>h.Walkspeed = 5
This should be:
h.WalkSpeed = 5 |
|
|
| Report Abuse |
|
|
BamRulez
|
  |
| Joined: 18 Sep 2010 |
| Total Posts: 239 |
|
|
| 11 Oct 2014 01:59 PM |
function onTouch(hit) local h = script.Parent:FindFirstChild("Humanoid") if h == nil then return end
h.WalkSpeed = 5 end
script.Parent.Touched:connect(onTouch)
-- Still doesn't work. |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 11 Oct 2014 02:03 PM |
'local h = script.Parent:FindFirstChild("Humanoid")'
um
script.Parent.Touched:connect(function(part) local humanoid = part.Parent:FindFirstChild("Humanoid") if humanoid then humanoid.WalkSpeed = 5 end end) |
|
|
| Report Abuse |
|
|
BamRulez
|
  |
| Joined: 18 Sep 2010 |
| Total Posts: 239 |
|
| |
|