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)
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
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.
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?
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
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