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

How do I correctly use the Hit function?

I now know that I could use the Hit function to execute a script when the part is hit by an explosion. I just don't know how to do that. I was wondering if I could get more help on this issue. I would love for you guys to help! Thanks!

2 answers

Make a part at the explosions position Then, see what it touches. You can use an onTouched() script and it will still work perfectly.

2 comments

0

I'm not sure I understand.

0

Ok, so, How are you making the explosion? Make a part at the same place as the explosion.

Best is like this : (Put this inside a part)(Script)

script.Parent.Touched:connect(function(hit)
wait(0.03)
--- STUFF 
end)

3 comments

0

Thanks!

0

Anytime.

0

I just realized: that just makes it where when I touch it, it also does the "STUFF," not just when it explodes.

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