Geting teleported to random places even when using the correct gameid

Hello , well the titles says it all , Geting teleported to random places even when using the correct gameid,

here the script if you need it

local ProximityPrompt = script.Parent
local TeleportService = game:GetService("TeleportService")
local placeId = tonumber(script.Parent.Parent.Gameid.Value)

local gamename = script.Parent.Parent.SurfaceGui.GameName.Text
ProximityPrompt.ActionText = gamename

local function onProximityPromptTrigger(player)
	print(player,placeId)
	TeleportService:Teleport(placeId,player)
	print("Teleportation successful!")
end

ProximityPrompt.Triggered:Connect(onProximityPromptTrigger)

thanks in advance

2 Likes
1 Like

gameId ≠ placeId

To whatever place you are teleporting, do not use its gameId but its placeId. You can get the PlaceId under AssetManager → Places → Right Click and then Copy PlaceId

3 Likes

Oh nice catch. I thought they were getting teleported to different games randomly but this makes more sense.

2 Likes

well only the part with proximityprompt contains the script with the teleport , also turned off all my plugins they werent much suspicious , still the same problem ,

If you do not find any suspicious scripts, then you can turn on all your plugins. Some plugins create hidden scripts that teleport players to their author’s game. I encountered a similar problem when I started my activity in Roblox Studio. Try @yoshicoolTV method, maybe it will be a solution for you.

1 Like

well the id from asset manager is as the same as the value i gave to the gameid , so i dont think thats the problem

1 Like

sadly it did not , ill keep trying to find the problem , probally a bug from the roblox side?

1 Like

The value may not always be the same, try checking this.

print(placeId)

Perhaps something is changing your value. Also, you don’t have to use StringValue; for identifiers, IntValue may also work for you.

well it is the same , also the script that changes the value dose not have any loops , still wont work

When you disable the script, do you still get teleported to random games? Also, of all the times you got teleported to games, was it ever the right one?

if i disable the script i wont get teleported to a random game ,

Also, of all the times you got teleported to games, was it ever the right one?

it was not ,

As I mentioned in your previous post, why not store the place ID in a constant variable like so:

local TeleportService = game:GetService("TeleportService")

local PLACE_ID = 123456 -- Replace this with the actual place ID

local proximityPrompt = script.Parent

proximityPrompt.Triggered:Connect(function(player)
	TeleportService:Teleport(PLACE_ID, player)
end)

sorry , but i found out why , it was a mistake of my behalf , i got the game id and not the place id , as yoshicoolTV said i was using gameID , after i was checking through the script that gets the place id

1 Like

thank you , i feel stupid it was a mistake of my behalf , i was using gameid not knowing i must use placeid , i had to re read my entire script (it was long) i found that i was using gameid to be sent to the gameid.value and not placeid since i used gameid for getting the game thumbnail

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.