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

I am working with the skill keyblind and it have problem at line 15 can some one help me please?

Asked by 4 years ago
Edited 4 years ago

everytime i press e it's always said "Animationid is not a valid member of Animation" I don't know what's wrong with it.

local Player = game.Players.LocalPlayer
local Character = Player.Character or script.Parent
local Humanoid = Character.Humanoid
local UserInputService = game:GetService("UserInputService")

local Animationid = 'rbxassetid://04039313294'
local Debounce = true
local Key = 'E'

UserInputService.InputBegan:Connect(function(Input, Istyping)
    if Istyping then return end
    if Input.KeyCode == Enum.KeyCode[Key] and Debounce == true then
        Debounce = false
        local Animation = Instance.new("Animation")     
        Animation.Animationid = Animationid
        local LoadAnimation = Humanoid:LoadAnimation(Animation)
        LoadAnimation:play()
        wait(5)
        Animation:Destory()
        Debounce = true     
    end
end)

I dont know how to fix these error so tell me. I do all like on youtube but it doesn't work for me.

Answer this question