|
| 24 Jul 2013 09:29 PM |
function click() while true do plyr = script.Parent.Parent.Parent.Parent.Parent.Character plyr.Humanoid.WalkSpeed = 30 c = script.Parent.Parent.Chakra wait(2) c.Value.Value = c.Value.Value - 5 if c.Value.Value == 0 then plyr.Humanoid.WalkSpeed = 16 end end end
script.Parent.MouseButton1Click:connect(click)
Thats to make the character run. But when it gets to 0, how can I make it stop going down? ================================================================== WALKING
function click() plyr = script.Parent.Parent.Parent.Parent.Parent.Character plyr.Humanoid.WalkSpeed = 16 script.Parent.Parent.Run.Script.Disabled = true end script.Parent.MouseButton1Click:connect(click)
BTW theres 2 scripts in Run
|
|
|
| Report Abuse |
|
|
|
| 24 Jul 2013 09:31 PM |
Try this out
http://wiki.roblox.com/index.php/Break#Break |
|
|
| Report Abuse |
|
|
|
| 24 Jul 2013 09:43 PM |
function click() while true do plyr = script.Parent.Parent.Parent.Parent.Parent.Character plyr.Humanoid.WalkSpeed = 30 c = script.Parent.Parent.Chakra wait(2) c.Value.Value = c.Value.Value - 5 if c.Value.Value == 0 then plyr.Humanoid.WalkSpeed = 16
end end end
I would suggest this o3o
running = false C = script.Parent.Parent.Chakra Character = game.Players.LocalPlayer:getPlayerFromCharacter()
script.Parent.Selected:connect(function(mouse) mouse.Button1Down:connect(function() running = true end) mouse.Button1Up:connect(function() running = false end) end)
while running do for i=Chakra.Value.Value, 0, -5 do wait(2) Character:findFirstChild("Humanoid").Walkspeed = 30 end Character:findFirstChild("Humanoid").Walkspeed = 16 end
|
|
|
| Report Abuse |
|
|