This file contains 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
-- Workspace - Part - Script | |
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) |
Reference : https://developer.roblox.com/en-us/onboarding/deadly-lava/2
'Roblox' 카테고리의 다른 글
[Roblox] 플레이어 장착 도구 (Tool) (0) | 2021.09.06 |
---|---|
[Roblox] 닿으면 플레이어 HP 회복되는 파트 (Part that restores player HP when touched) (0) | 2021.09.05 |
[Roblox] 리더보드에 플레이어 점수 설정 (Set player score on leaderboard) (0) | 2021.09.05 |
[Roblox] 닿으면 페이드되는 파트 (Parts that fade when touched) (0) | 2021.09.05 |
[Roblox] 사라졌다가 나타나는 파트 (Part that disappears and appears) (0) | 2021.09.05 |