Created
September 21, 2021 03:00
-
-
Save modster/413543bcfa567d75e473db354bee262b to your computer and use it in GitHub Desktop.
Using Particles for Explosions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- From: | |
-- https://developer.roblox.com/en-us/onboarding/using-particles-for-explosions/1#testing-particle-bursts | |
local trapObject = script.Parent | |
local particleEmitter = trapObject:FindFirstChild("Explosion") | |
local EMIT_AMOUNT= 30 | |
local function killPlayer(otherPart) | |
local character = otherPart.Parent | |
local humanoid = character:FindFirstChildWhichIsA("Humanoid") | |
if humanoid then | |
humanoid.Health = 0 | |
end | |
end | |
trapObject.Touched:Connect(killPlayer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment