script.Parent.Touched:connect(function()
if Touched then
game.Players.ChildAdded.humanoid = 0
end
end)
✓ ANSWER ACCEPTED
I'm not dieing?
1 answer
✓ Accepted answer
local Brick = script.Parent
Brick.Touched:connect(function(Obj) -- When you touch it gets the "Leg" or "Arm"
local Player = game:GetService("Players"):GetPlayerFromCharacter(Obj.Parent)
-- Gets the Instance "Player"
if Player and Player.Character then -- Obv its gonna be there... but check it anyways.
local Humanoid = Player.Character:WaitForChild("Humanoid") -- Find the Humanoid
Humanoid:TakeDamage(100) -- Easy damage function.. :)
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
