I have a dumbell and an animation for it. I tried to add an animation but the cooldowns dont work. Does anyone know why?
also how do I make the code go into that fancy lua box?
**local Dumbell = script.Parent
local animation =script.Animation
animation.AnimationId = "rbxassetid://18551812338"
local Cooldown = false
Dumbell.Activated:Connect(function()
if Cooldown == false then
Cooldown = true
end
local humanoid = Dumbell.Parent:FindFirstChild("Humanoid")
humanoid.Animator:LoadAnimation(animation):Play()
wait(1)
if Cooldown == true then
wait(2)
Cooldown = false
end
end
)**
** You are now Level 1! **