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

How do i make A Varaible that Gets The player that touched the part and uses it for Respawning?

i've tried this

function Hello() 
		plr=Touched:Connect(Hello)
                plr.Torso:Destroy()
end
script.Parent.Touched:connect(Hello)

Ok, Well When i Debugged it And hit the brick,, it did all of the stuff i wanted it to do EXCEPT kill the player, cause it was supposed to be a trap..

Its supposed to kill the player once he touches the brick

1 answer

✓ Accepted answer

script.Parent.Touched:connect(function(plr) if plr.Parent:findFirstChild("Humanoid") then plr.Parent.Humanoid.Health = 0 end end)

4 comments

0

Thank you (Im Running out of rep D:)

0

Dosent Work..

0

Nvm, Think i got somethin wrong

0

Im going to make it a trap to kill everyone instead >:)

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