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

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

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

2 comments

0

have u tried a characterAdded?

0

Uh.. How should I execute that? Sorry if I'm asking too much. I'm new at this stuffs.

2 answers

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()

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.

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