Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
funzrey 58
10 years ago

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

Log in to vote
0
Answered by
Link43758 175
10 years ago

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

0
Thank you (Im Running out of rep D:) funzrey 58 — 10y
0
Dosent Work.. funzrey 58 — 10y
0
Nvm, Think i got somethin wrong funzrey 58 — 10y
0
Im going to make it a trap to kill everyone instead >:) funzrey 58 — 10y
Ad

Answer this question