Im making a fireball and I don't why this code isn't working
local fireball = script.Parent
fireball.Touched:connect(function(hit)
if hit.Parent.Name == "Wall" then
script.Parent:remove()
end
end)
Im making a fireball and I don't why this code isn't working
local fireball = script.Parent
fireball.Touched:connect(function(hit)
if hit.Parent.Name == "Wall" then
script.Parent:remove()
end
end)
I haven't coded in Lua in quite some time, but something like this might work
script.Parent.Touched:connect(function(hit)
if hit.Name == "Wall" then
script.Parent:remove()
elseif hit.Parent.Name == "Wall" then
script.Parent:remove()
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
thanks sm