-
So I made a weapon giver like you would usually see in a tycoon. And I have a knife for the first weapon and I made the animations and the damage.
-
Problem is, when I clone the tool from the serverstorage the animation doesnt work anymore and it gives me the error [LoadAnimation requires an Animation object]
-
What solutions have you tried so far? Ive tried loading the character in a different way, such as "local char = player.Character or player.CharacterAdded:Wait()
local id = 10528074307
local canSlash = true
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local animation = script.Parent:FindFirstChild("Animation")
script.Parent.Activated:Connect(function()
local swingAnimation = char.Humanoid:LoadAnimation(animation)
if canSlash == true then
swingAnimation:Play()
canSlash = false
wait(1)
canSlash = true
end
end)
Also extra info: The knife animation works if I pick up the tool from the ground or put it in the starterpack. Just not when its cloned into the backpack.