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

Why dosen't my animations load in game?

Asked by 6 years ago

Every animation I've had dosen't load in game but the walkspeed does ofc, what do I need to do, to make the animation load?

repeat wait() until game.Players.LocalPlayer.Character~=nil local plr=game.Players.LocalPlayer local chr=plr.Character local hum=chr:WaitForChild("Humanoid") local UserInput=game:GetService("UserInputService")

local crtAnimation

local normalSpeed=16

local animationsList={ [Enum.KeyCode.V] = {hum:LoadAnimation(script:WaitForChild("Atease")),16}, [Enum.KeyCode.M] = {hum:LoadAnimation(script:WaitForChild("Sit")),0}, [Enum.KeyCode.N] = {hum:LoadAnimation(script:WaitForChild("Lean on wall")),0}, [Enum.KeyCode.Q] = {hum:LoadAnimation(script:WaitForChild("Salute")),16}, [Enum.KeyCode.X] = {hum:LoadAnimation(script:WaitForChild("Surrender")),0}, [Enum.KeyCode.Z] = {hum:LoadAnimation(script:WaitForChild("Lay down")),0}, [Enum.KeyCode.B] = {hum:LoadAnimation(script:WaitForChild("Kneel")),0},

} local function StopAllAnims() for _,v in pairs(animationsList) do if crtAnimation~=v[1] and v[1].IsPlaying then v[1]:Stop() end end end UserInput.InputBegan:connect(function(input) if animationsList[input.KeyCode] ~= nil and UserInput:GetFocusedTextBox()==nil then if animationsList[input.KeyCode][1] ~= crtAnimation then crtAnimation=animationsList[input.KeyCode][1] hum.WalkSpeed=animationsList[input.KeyCode][2] StopAllAnims() crtAnimation:Play() else hum.WalkSpeed=normalSpeed crtAnimation=nil StopAllAnims() end end end)

0
use code block pls PoePoeCannon 519 — 6y
0
Please use a code block.. ;n; Fifkee 2017 — 6y

Answer this question