Hello, I’m having an issue with a rocket launcher I made. The way I scripted it involves events to remove the rocket once it collides with something, however currently it removes all rockets. This means if you fire multiple shots, when one of those shots hit, all the shots are instantly removed. Can I get some help with this? I will attach the model file to this for debugging, I have no idea where I have gone wrong on it as I’m quite new with tool designing.
Yes, that is quite similar to the start of my script. Sorry for the long wait before this response, I have been inactive for a while doing other things relating to school.
What I wrote was actually wrong. Not only you shouldn’t use spawn(), it was in the wrong place.
Heres how the code should’ve actually looked like
function rocket()
–rocket stuff goes here
rocket.Touched:Connect(function()
local touchedevent = coroutine.create(function()
–explode rocket and delete it
coroutine.resume(touchedevent)
end
its alright, the problem might be errors in the script, go on the thing that shows if there is any errors then get a professional scripter to help you if you really need it, i’m not a scripter so id find someone else.