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

What does the error mean. attempt to compare number and userdata?

The problem is when the zombie dies once the gun doesn't work anymore, this is what is said in output. Attempt to compare number and userdata 1st line of code which says is the problem in output

if Zombie.Health>=0 then

2nd

fire(mouse.Hit.p+rndm, 1)

3rd

mouse.Button1Down:connect(function() onButton1Down(mouse) end)

1 answer

✓ Accepted answer

i don't know how to reoslve the problem but my suggestion is to replace if Zombie.Health>=0 then with Zombie.Died:Connect(function()

end)

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