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

Animation not playing?

This script is inside a Sword tool, two animations are inside the script. When the script attempts to play either one of them, it says "--Content failed because HTTP 403 (HTTP/1.1 403 Forbidden) --Animation failed to load : Workspace.Toadboyblue.Sword.Script.RightSwipe --Object must be in Workspace before loading animation."

This is the script:

local sword = script.Parent
local blade = script.Parent.Handle
local duringswing = false
local Ani1 = game.Workspace.RightSwipe
local Ani2 = game.Workspace.LeftSwipe
local last = 2
local midswing = false
sword.Activated:connect(function()
	local Me = script.Parent.Parent:FindFirstChild("Humanoid")
		if midswing == false then
			duringswing = true
			midswing = true
			if last == 1 then
				last = 2
		        animTrack = Me:LoadAnimation(Ani2)
			else
				last = 1
				animTrack = Me:LoadAnimation(Ani1)
			end
			animTrack:Play()
		end
		wait(0.7)
		midswing = false
		duringswing = false
end)

Please excuse the excess lines, I wanted to put in the entire script as it was.

1 answer

I solved this myself, so if anyone else is wondering how to fix this; use a LocalScript.

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