Skip to content

Instantly share code, notes, and snippets.

@modster
Created September 21, 2021 03:00
Show Gist options
  • Save modster/413543bcfa567d75e473db354bee262b to your computer and use it in GitHub Desktop.
Save modster/413543bcfa567d75e473db354bee262b to your computer and use it in GitHub Desktop.
Using Particles for Explosions
-- 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