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

Why won't this thing work?


function changeMove()
	if MoveNum == 1 then
		MoveNum = MoveNum + 1
		Move1()
	elseif MoveNum == 2 then
		MoveNum = MoveNum + 1
		Move2()
	elseif MoveNum == 3 then
		MoveNum = MoveNum + 1
		Move3()
	elseif MoveNum == 4 then
		MoveNum = 1		
		Move4()
	end
end

Error: attempt to call global 'Move1' (a userdata value) Thats the only error, strangely. Also, the function runs on a click event.

1 comment

0

Obviously Move1 is a userdata value. What is Move1?

1 answer

✓ Accepted answer

When you call LoadAnims() in your code, you redeclare Move1 as an AnimationController or whatever. You should consider changing your variable names.

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