Why is my teleport script no work?

hello, so i made a teleport script like that: script.Parent.Touched:Connect(function() local tps = game:GetService("TeleportService") tps:Teleport(script.Parent.Place.Value) end)
and i made that as normal script with stringvalue inside that have the place number.


so sombody can tell me why is no works? (i try change the: tps:Teleport(script.Parent.Place.Value) to: tps:Teleport(4522571024) )
note: the code no have a bug its just replace my script to Print(“Hello World!”)

Please describe what you mean by “no work”

Does it return an error in the output window? Does a popup show to suggest that the teleport has failed due to the wrong place id? There’s so many possible reasons why it wouldn’t work you need to give more info.

1 Like

“note: the code no have a bug its just replace my script to Print(“Hello World!”)”

1 Like

You have to use localscript. Because it even says on the official website. TeleportService

1 Like

I’ve noticed the place you’re trying to teleport is this:

The username doesn’t match yours and the permissions prevent entering it. That’s probably why it won’t teleport there.

but this is my alt player on roblox… (and this is a group)

Okay. So check the following:

  1. that you’re on that account.
  2. that you’ve provided the player in your call to the Teleport function (should be the second argument).
  3. that you’ve published the place if you think it’s changed back to the default script. ALT+P will publish.
tps:Teleport( 4522571024, thePlayerToTeleport )
1 Like

is no have bug is just replace in-game my script to the Dafult script check the picture on the post

Replace the default contents with your script, making sure your teleport line includes the player as shown in my previous post.

Then you must publish the game if you want it to save. Alt+P will publish it.

Dude, check also if the player touching this has a humanoid also since the baseplate is constantly touching it too.

Also, you should publish the game and play it for this to work.

1 Like

i publish and is stay say on dev console “Hello World!”

1 Like

Also, the teleport service takes 2+ parameters , the place id and the player instance are required, so please note that
Use

script.Parent.Touched:Connect(function(hit)
       if hit.Parent:FindFirstChild("Humanoid") then
             local tps = game:GetService("Teleportservice")
             tps:Teleport(game.Players:WaitForChild(hit.Parent.Name), script.Parent.PlaceId)
      end
end
1 Like

but the script is works the thing that no works is just that:

image is replace scripts even after publish

1 Like

You have to close the script edited in studio and publish. It’s old known bug.

i tried to do that and is stay no works for me…

You are trying to teleport nothing to a place,
you need to include the player as the second parameter,

TeleportService won’t teleport a player to a place automatically,
as it requires a player to teleport

When you try to play a game in studio does it says that you made changes to the script in output?

I am trying to say this but it seems he’s just ignoring me, so plz help him

1 Like

Can you try again using the advice people have actually given you instead of sending the same screenshot and ignoring what people are saying.

2 Likes

oof i tried to play now from studio and that happend image

1 Like