Hazard
Hurts characters that touch the part it’s in (lava, spikes), again every cooldown while they stay.
- Inherits: Behavior → Instance
- Creatable: Yes:
new Hazard(), orInstance.new('Hazard', parent). - Replication: Server only: it, and everything inside it, is never sent to clients.
Hurts characters that touch the part it’s in, again every cooldown while they stay.
Properties
Section titled “Properties”damage
Section titled “damage”Type: number · Default: 100 · Range: 0 to 1,000,000 (clamped) · Access: read/write · Replicates: no
Health it takes per hit (characters start with 100).
cooldown
Section titled “cooldown”Type: number · Default: 0.5 · Range: 0 to 60 (clamped) · Access: read/write · Replicates: no
Seconds between hits on the same player while they keep touching it.
Inherited from Behavior: enabled, running
Inherited from Instance: name, archivable, id, className, parent, destroyed
Methods
Section titled “Methods”Inherited from Behavior: activate
Inherited from Instance: getPropertyChangedSignal, setAttribute, getAttribute, getAttributes, getAttributeChangedSignal, getChildren, getDescendants, findFirstChild, findFirstChildOfClass, findFirstChildWhichIsA, findFirstAncestor, findFirstAncestorWhichIsA, waitForChild, isA, isDescendantOf, isAncestorOf, getFullName, clearAllChildren, destroy, clone, toString
Events
Section titled “Events”Inherited from Instance: changed, childAdded, childRemoved, descendantAdded, descendantRemoving, ancestryChanged, destroying, attributeChanged