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

LoadAnimation requieres a value?

im stumped on this code, its output error says the the load animation cant be nil, but i can seem to figure it out


local psuedoanimetrack

local playablity = true
local ape = script.Parent
local animetable ={
	idle ="http://www.roblox.com/Asset?ID=1265687850",
	run ="http://www.roblox.com/Asset?ID=1265540413"
	
	}


function playdaanime (animName,humanoid)
	local anin = animetable[animName].anin
	psuedoanimetrack= humanoid:LoadAnimation(anin)
	psuedoanimetrack:Play()
end


function runs(speed)
	
	if playablity and speed >0 then
		
		playdaanime("run",ape.Humanoid)
		
	else
		playdaanime("idle",ape.Humanoid)
	end
end
ape.Humanoid.Running:connect(runs)


1 answer

✓ Accepted answer

The animation is actually an object. Not an ID. You should add that object into the workspace. Let me put an example. The Idea here is that you need to put the animation object somewhere convenient. Put the Id into the animation Object and load the Object into the humanoid

1 comment

0

thanks, got it working, though still some bugs

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