Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Sword Animation works in studio but does not work in game and getting error?

I want a sword animation to play and it works in studio but not in game and I have tried turning on filtering but that did not work. I also get an error saying that the sword animation could not be loaded when I play the actual game.

local CanAttack = true

script.Parent.Activated:connect(function()
	local attack = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack)

	if CanAttack == true then
		attack:Play()
		CanAttack = false
		wait(1)
		attack:Stop()
		CanAttack = true
		script.Parent.CanDamage.Value = true

	end
end)

5 comments

0

What type of script is it in?

0

local

0

The animations must be self made. If they are not, it errors.

0

Are you using your own animation in your own place?

0

I am using my own animation but it is in a group place

1 answer

✓ Accepted answer

If you uploaded the animation on your ROBLOX account then it will only work on your games. You should just need to reupload the animations to your group and replace the AnimationIds with the group's AnimationIds and it should work.

This discussion is preserved as it was. New answers, comments, and votes are closed.