Hello. I was wanting to make a Hide and Seek game and I was wondering how I could make a script so when the Seeker touches a player, the touched player dies?
Please help.
Hello. I was wanting to make a Hide and Seek game and I was wondering how I could make a script so when the Seeker touches a player, the touched player dies?
Please help.
Make sure this is a server script and you replace ["Seeker's Name Here"] with the seeker's name.
game.Players["Seeker's Name Here"].Character.HumanoidRootPart.Touched:Connect(function(hit)
if game.Players:FindFirstChild(hit.Parent.Name) and hit.Parent:FindFirstChild("Humanoid") then -- we know its a real player
local targets_humanoid = hit.Parent:FindFirstChild("Humanoid")
targets_humanoid.Health = 0
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Dude the seeker is not a player, it's a team