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

How to make a tp script that would still work even when the character respawn/reset?

Asked by 4 years ago

So I've just started to learn the scripting and I'm trying to figure out how to make a script that would work even when the character respawned/reset.

local x = 2810.13721 local y = 14.62482548 local z = -20.818779 game.Players.LocalPlayer.Character:MoveTo(Vector3.new(x, y, z))

This is the script i've been using and once i've respawn/reset. It won't work at all and I have to execute the specific script again for it to work. Anything to work around it? Thanks. :D

0
have u tried a characterAdded? aprilsfooled 29 — 4y
0
Uh.. How should I execute that? Sorry if I'm asking too much. I'm new at this stuffs. ShadowGunzs 0 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago
local x = 2810.13721 local y = 14.62482548 local z = -20.818779 
function sub2(creeper_movie12)
game.Players.LocalPlayer.Character:MoveTo(Vector3.new(x, y, z))
end

sub2()
Ad
Log in to vote
0
Answered by 4 years ago

So basically have a pcall that makes the pad that the player appears on and make it setspawnontouch or something like that, you'll find it in the spawn properties. So ehre's how you do it

Local pcall = game.ReplicatedStorage.LocalScript
RenderStepped.TeleportService

onTouch(hit)
SetSpawn.New

local character = player.nil
local Player = game.Nil.Player.StarterCharacter

if tweened then
game.StarterGui.nil.ScreenGui.Image.Size = nil
and
game.StarterGui.ScreenGui.Size = (1,0,1,36)
game.StarterGui.ScreenGui.Position = (0,0,0,-36)
game.nil.Value.Print("Hello World") -- this will appear in the output to ensure the  script is functioning
elseif game.ReplicatedStorage.LocalSCript:Clone()
function(CloneService).net

wait(9)
print("You're welcome")

You need the Roblox.StudioDeluxe Package in plugins and set the oc3optical line to lua.net///34 and have it set to the router connected to an IP that is related to the server and client handler using a serverscript in serverscriptservice and use datastores through there.

Answer this question