Answers for "how to get humanoid from touched event"

Lua
0

how to kill humanoid with click detector roblox

--Kill a humamanoid in Lua. Grepper doesn't support Lua so this is set to "Whatever"
game.Players.PlayerAdded:Connect(function(player) -- gets player
local detector = --Add detector here
local function onClicked()
	player.Character.Humanoid.Health = 0 --or whatever you want it to be
    --optional more code
end
	detector.MouseClick:Connect(onClicked)
end)
Posted by: Guest on July-13-2020

Code answers related to "how to get humanoid from touched event"

Browse Popular Code Answers by Language