I I'm trying to make a respawn on touch script' help?
OK, here's the script. Put this script inside the respawn-on-touch brick.
Script:
1 | script.Parent.Touched:connect( function (Hit) -- Activates if Touched |
2 | Player = Game.Players:GetPlayerFromCharacter(Hit.Parent) -- Checks if what touched has a player. |
3 | if Player then -- Checks the Player |
4 | Player:LoadCharacter() -- Loads if it is a Player |
5 | end -- Ends the "if" statement. |
6 | end ) -- Ends the function. |
Well, bye. Enjoy your brick.