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

Animation has no errors but gives no results, why?

Asked by 4 years ago

So, I was fooling around and I used UserInputService or whatever it is, to try and activate an animation. I don't know why. But I fooled around until I stopped getting errors, but no product was produced, here's the code, can anybody tell me why.

local UserInputService = game:GetService("UserInputService")

local player = game.Player.LocalPlayer

repeat wait() until player.Character.Humanoid

local humanoid = game.player.Character.Humanoid

Animation = Instance.new("Animation")

Animation.AnimationId = "rbxassetid://4475040216"

local playAnim = humanoid:LoadAnimation(Animation)

local e = Enum.KeyCode.E

local function IsheEKeyDown() return UserInputService:IsKeyDown(e) end

local function Input(input, gameProcessedEvent) if IsheEKeyDown() then playAnim:Play() end end

0
can you please use code block AltNature 169 — 4y

Answer this question