Hello, I am quite new to scripting so I apologize if this is a dumb question, I was wondering how to fix the error above, here's the code
wait()
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Tool = script.Parent
local Handle = Tool:WaitForChild("Handle")
local PlayingAnimation = nil
local Activated = false
local Equipred = false
local SrartTick = tick()
local CanUse = false
local ActiveTick = tick()
local mouse = Player:GetMouse()
local Animations = {
Idle = {
Animation = Character.Humanoid:LoadAnimation(script.Parent:WaitForChild("Idle")),
Duration:1.5,
},
Equip = {
Animation = Character.Humanoid:LoadAnimation(script.Parent:WaitForChild("Equip")),
Duration:0.7,
},
Stab1 = {
Animation = Character.Humanoid:LoadAnimation(script.Parent:WaitForChild("Stab1")),
Duration:0.8,
},
Stab2 = {
Animation = Character.Humanoid:LoadAnimation(script.Parent:WaitForChild("Stab2")),
Duration:0.9,
},
ThrowHold = {
Animation = Character.Humanoid:LoadAnimation(script.Parent:WaitForChild("ThrowHold")).
},
Throw = {
Animation = Character.Humanoid:LoadAnimation(script.Parent:WaitForChild("Throw")),
},
}
Tool.Equipped:Connect(function()
warn("Equipped")
Equipred = true
PlayingAnimation = Animations.Equip
PlayingAnimation.Animation:Play()
StartTick = tick()
repeat wait() until (tick)) - StartTick) >= PlayingAnimation.Duration
PlayingAnimation.Animation:Stop()
PlayingAnimation = Animations.idle
PlayingAnimation.Animation:Play()
CanUse = true
warn ('AfterEquipped')
end)
