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

how would i write a script to teleport to another place on death?

Asked by 4 years ago
Edited by theking48989987 4 years ago

it would also work to have the code teleport me when i touch a certain object. i just think it would be cleaner if it was upon death

local service = game:GetService("TeleportService") 
local place = (the game the player will be sent to)
local plr = game.Players.goulstem

service:Teleport(place,plr)
0
Please make an attempt before requesting a script theking48989987 2147 — 4y
0
i tried: 1: local service = game:GetService ("TeleportService) 2:local plce = (the game the player will be sent to) 3: local plr = game.player.goulstem; 5: service:Teleport(place,plr) Leviathan_opposed 0 — 4y
0
but that obviously didn't work because that has nothing to do with player death Leviathan_opposed 0 — 4y
0
well, you can use a Humanoid.Died event to detect when a player dies theking48989987 2147 — 4y
View all comments (2 more)
0
apart from that, line 2, you have to replace with the placeid, and line 3, you actually have to get a player in your game, as Goulstem isnt always going to be in your game theking48989987 2147 — 4y
0
it is, the id is 3703255527 thanks for the help. Leviathan_opposed 0 — 4y

Answer this question