Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make someone respawn when they touch a tool?

Hello, so I have a tool, it's kind of a sword etc and I want it to respawn or kill players when I touch them with it.

Help appreciated please.

2 comments

0

Do you mean the sword should kill a player on touch?

0

That also works, yes

1 answer

You could try this code:

script.Parent.Touched:Connect(function(p) 
local player = game.Players:GetPlayerFromCharacter(p.Parent)
if player then
p.Parent.Humanoid:TakeDamage(100) 
end
end)

Why it works:

Simple, you make a script inside the tool, and using the touched event, it will kill (or respawn) the player.

This discussion is preserved as it was. New answers, comments, and votes are closed.