Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago

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

Log in to vote
1
Answered by
tomekcz 174
4 years ago

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)

Ad

Answer this question