Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How do I make a animation for running but not walking?

Asked by 8 years ago
Edited 8 years ago

Okay so im trying to make a animation for running but what ever I do it connects to walking can someone help? and also im having problem when it loops it looks weird is their a way to fix that?

Heres the code.

Script:

function onPlayerEntered(player) repeat wait () until player.Character ~= nil local s = script.SprintScript:clone() s.Parent = player.Character s.Disabled = false player.CharacterAdded:connect(function (char) local s = script.SprintScript:clone() s.Parent = char s.Disabled = false
end) end

game.Players.PlayerAdded:connect(onPlayerEntered)

Local Script inside of it:

local mouse = game.Players.LocalPlayer:GetMouse() local running = false

function getTool()
for _, kid in ipairs(script.Parent:GetChildren()) do if kid.className == "Tool" then return kid end end return nil end

mouse.KeyDown:connect(function (key) key = string.lower(key) if string.byte(key) == 48 then running = true local keyConnection = mouse.KeyUp:connect(function (key) if string.byte(key) == 48 then running = false end end) for i = 1,5 do game.Workspace.CurrentCamera.FieldOfView = (70+(i2)) wait() end game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 32 repeat wait () until running == false keyConnection:disconnect() game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16 for i = 1,5 do game.Workspace.CurrentCamera.FieldOfView = (80-(i2)) wait() end end end)

1
You need to make the animation smooth. Learn how to make things animate smoothly, so that at the end of the animation, it looks exactly the same as the start of the animation. Can you provide us with some code for your running animation? You'll need to make a sprint script or something for it to actually be used, since ROBLOX characters walk by default, and can't 'run' without intervention. TheDeadlyPanther 2460 — 8y
0
Could you please format your code so we can clearly see the script and maybe then help you. iDarkGames 483 — 8y
0
how do I do that? Streblo6226 0 — 8y

Answer this question