|
| 15 Jul 2016 12:56 AM |
Well I recently made a script which runs when you press Left Shift and the Animation ran once but then when I pressed it again it didn't work anymore.
That would be amazing if anyone could help with this. |
|
|
| Report Abuse |
|
| |
|
| 15 Jul 2016 12:57 AM |
| That would be amazing if you posted the code. |
|
|
| Report Abuse |
|
|
| 15 Jul 2016 12:58 AM |
| oops didn't have a mistake lol^ |
|
|
| Report Abuse |
|
|
| 15 Jul 2016 12:58 AM |
function RightA(io) if io.KeyCode == Enum.KeyCode.LeftShift then running =true game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 25 local target = CFrame.new(-0.55, -0, -1) * CFrame.Angles(math.rad(-90), math.rad(-50), 0) local speed = 0.1 wait(0.1) game:GetService("RunService").RenderStepped:connect(function() weld3.C1 = weld3.C1:lerp(target,speed) end) end end
game:GetService("UserInputService").InputBegan:connect(RightA)
function LeftA(io) if io.KeyCode == Enum.KeyCode.LeftShift then running =true game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 25 local target = CFrame.new(0.2, 1, -1.3) * CFrame.Angles(math.rad(-90), math.rad(-35), 0) local speed = 0.1 wait(0.1) game:GetService("RunService").RenderStepped:connect(function() weld2.C1 = weld2.C1:lerp(target,speed) end) end end
game:GetService("UserInputService").InputBegan:connect(LeftA)
function StopRunning(key) if key == "0" then game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 14 local target = CFrame.new(0.1, 1.7, -1.3) * CFrame.Angles(math.rad(-89), math.rad(20), 0) local speed = 1 wait(0.1) game:GetService("RunService").RenderStepped:connect(function() weld2.C1 = weld2.C1:lerp(target,speed) end) local target2 = CFrame.new(-0.55, -0.25, -1) * CFrame.Angles(math.rad(-90), 0, 0) local speed2 = 1 wait(0.1) game:GetService("RunService").RenderStepped:connect(function() weld3.C1 = weld2.C1:lerp(target2,speed2) end) end end mouse.KeyUp:connect(StopRunning) |
|
|
| Report Abuse |
|
| |
| |