RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"kill the player if they touch a part tagged with Lava using the tageditor"
-- script for part tagged with Lava local part = script.Parent local function onTouched(otherPart) local player = game.Players:GetPlayerFromCharacter(otherPart.Parent) if player and part:IsDescendantOf(game.Workspace) and part:IsA("BasePart") then local tags = game:GetService("CollectionService"):GetTags(part) for _, tag in ipairs(tags) do if tag == "Lava" then player.Character.Humanoid.Health = 0 break end end end end part.Touched:Connect(onTouched)