Created
September 21, 2021 04:09
-
-
Save modster/2cd041375c69f06f616af3abf4a3d1cd to your computer and use it in GitHub Desktop.
Kill Player on Touched Event
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
local lava = script.Parent | |
local function killPlayer(otherPart) | |
local partParent = otherPart.Parent | |
local humanoid = partParent:FindFirstChild("Humanoid") | |
if humanoid then | |
humanoid.Health = 0 | |
end | |
end | |
lava.Touched:Connect(killPlayer) | |
-- https://developer.roblox.com/en-us/onboarding/deadly-lava/2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment