|
| 25 May 2013 03:44 AM |
X = script.Parent
function onRunning(speed) if speed>0 then pose = "Running" X.Torso["Right Shoulder"].CurrentAngle = -1.5 X.Torso["Left Shoulder"].CurrentAngle = 1.5 X.Torso["Right Shoulder"].DesiredAngle = -1.5 X.Torso["Left Shoulder"].DesiredAngle = 1.5 X.Torso.BodyVelocity.velocity = X.Torso.CFrame.lookVector *80 X.Torso.BodyVelocity.maxForce = Vector3.new(99999999, 0, 99999999) else pose = "Standing" X.Torso.BodyVelocity.maxForce = Vector3.new(0, 0, 0) end end
X.Humanoid.Running:connect(onRunning)
walkingSpeed = 20 runningSpeed = 30
Walk = 0 Bin = script.Parent
function onButton1Down(mouse) Walk = 0 while Walk == 0 do game.Players.localPlayer.Character.Humanoid.WalkSpeed = runningSpeed wait(1.0) end game.Players.localPlayer.Character.Humanoid.WalkSpeed = walkingSpeed end
function onButton1Up(mouse) Walk = 1 end
function onSelected(mouse) mouse.Button1Down:connect(function() onButton1Down(mouse) end) mouse.Button1Up:connect(function() onButton1Up(mouse) end) end Bin.Selected:connect(onSelected)
|
|
|
| Report Abuse |
|
|
| |
|
WishNite
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 15828 |
|
|
| 25 May 2013 03:59 AM |
| Since this is a local script, try adding a repeat wait() until game.Players.LocalPlayer at top. |
|
|
| Report Abuse |
|
|
| |
|
| |
|