Hit (Event): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Camoy
Example/heading added
>MrNicNac
Old template structure.
Line 3: Line 3:
|arguments = [[Instance]] part, [[Number]] distance
|arguments = [[Instance]] part, [[Number]] distance
|description = Fired when an object hits another one.
|description = Fired when an object hits another one.
|object = [[Explosion]]
|object = Explosion
|}}</onlyinclude>
|}}</onlyinclude>
|}
|}

Revision as of 02:42, 20 April 2011

Hit ( Instance part, Number distance )
Description Fired when an object hits another one.
Member of: Explosion

Description

The Hit event for explosions fires off whenever the explosion comes in contact with another brick. Can be useful for triggering bricks to disappear after being blown up, or anything else for items hit by the explosion.

Example
game.Workspace.Explosion.Hit:connect(function(p, d)
  print("Hit ", p, " from", d, " studs.")
end)