New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Still have questions? Join our Discord server and get real time help.
0

# How do I make an animation load?

I am making a game, and I'm trying to make a sword, but my animations wont work. Yes, I tried being owner of team create and It's not a group game. Here's my script.

local debounce = true

script.Parent.Activated:Connect(function()
if debounce == true then
debounce = false
Anim:Play()
script["Error Soul Sword Noise"]:Play()
wait(1)
debounce = true
end
end)



Can someone help me fix it?

0

I think you want it to play everytime you "fight" with the sword. 1. Create a Animation and a LocalScript inside of your tool (Not in your Handle) 2. Open your script and paste this in it:

script.Parent.Equipped:Connect(function(Mouse) -- Detect If the Player is holding the Sword
Mouse.Button1Down:Connect(function() -- Detect If the Player clicked with the Sword
local  animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation) --Find the animation
animation:Play() -- Plays the animation

end)
end)

0
Won't Work KamKam_AJHasBeenBan 0 — 10d
0
This isn't a bad answer, as it works, but I don't think it's something that should be used for an extensive amount of time due to you constantly loading the animation per click. You also forget to disconnect your mouse function, leading to exponential event firings which lead to exponential animation loads, easily hitting the 256 animation cap. Fifkee 1194 — 10d
0
um. KamKam_AJHasBeenBan 0 — 10d
0
still wont work KamKam_AJHasBeenBan 0 — 10d