#Help with teleporting to another place

1 messages · Page 1 of 1 (latest)

young flare
#

Hello guys! im working on a teleport system that teleport a player to another place once the player steps on a part. does anyone knows why the system doesnt work? I already checked the placeID, the script and the option that allows me to publish the game.

quick cradle
#

Brother

#

what do you expect us to do

#

with no script

#

are we meant to be mind readers?

young flare
#

Chill

viscid raven
#

give us the script lad

quick cradle
#

aight

young flare
#

Just a moment

#

local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")

local GAME_PLACE_ID = 85700934212

local function startGame(playersInElevator)
local success, reservedServerCode = pcall(function()
return TeleportService:ReserveServer(GAME_PLACE_ID)
end)

if not success then
    warn("Errore nella riserva del server privato:", reservedServerCode)
    return
end

TeleportService:TeleportToPrivateServer(
    GAME_PLACE_ID,
    reservedServerCode,
    playersInElevator
)

end

workspace:WaitForChild("StartPart").Touched:Connect(function(hit)
local player = Players:GetPlayerFromCharacter(hit.Parent)
if player then
startGame({player})
end
end)

#

Here the script

young flare
#

@quick cradle @viscid raven can u help me now?

viscid raven
#

hm

#

what error does it give

#

@young flare

young flare
#

[Teleport] ReserveServer failed: HTTP 403 (Forbidden)

quick cradle
#

are you testing this in studio?

#

if so

#

teleportservice doesnt work in studio

young flare
#

Ik this, it still doesnt work

viscid raven
#

priv server reserves a server for you

young flare
#

Wait

#

Wym

viscid raven
#

local function startGame(playersInElevator)
local success, reservedServerCode = pcall(function()
return TeleportService:ReserveServer(GAME_PLACE_ID)
end)

#

priv servers do reserve a server

#

run it

#

does it give the same error

young flare
#

Yes

#

Idk why

viscid raven
#

whats the max player amount in elevator

young flare
#

I know i have to activate certain settings, like ID and publish games. Do I have to do other?

young flare
viscid raven
#

then just telport them to the normal game

#

with 1 player max

#

but i dont know about more people

young flare
warped sphinx
young flare
#

Idk do i have to publish the game AND the place?

#

I did it, idk what to do

viscid raven
#

hey

#

is this in a ServerScript?

warped sphinx
hollow kindleBOT
#

studio** You are now Level 9! **studio

viscid raven
#

it should freeze you

#

when you touch the part

#

if iti does, the script works fine

young flare
young flare
warped sphinx
#

I tested the script in one of my games, and it worked perfectly fine. I think you're just not getting the placeId correctly

viscid raven
#

is this placeid 2 different experiences, or is it 2 games in one experience

young flare
warped sphinx
#

Go into asset manager, places, then right click and copy the place id of the place you want it to tp to

young flare
viscid raven
#

ok

warped sphinx
#

huh

#

So you did it correct

young flare
#

Hmm that's weird

#

Again maybe i have to activate specific settings?

viscid raven
#

are the permission correct

young flare
viscid raven
#

the placeid is public, right

young flare
#

Yh

viscid raven
#

ok ill keep troubleshooting

#

does it freeze you when you touch the part

#

or can you move

young flare
#

I can walk. Ik if it freezes it is loading, right?

viscid raven
#

yes

young flare
#

This is the first time implementing this mechanic

warped sphinx
#

So, just to make sure even though the other guy already asked, you are inside the actual game on roblox when testing this, and not studio, correct

young flare
#

And im figuring out what's wrong

viscid raven
#

you arent checking if thats an actual player, ceck if its the humanoid

young flare
warped sphinx
#

There's no problem with that lol

viscid raven
#

well the part can collide with other parts

#

hm

young flare
warped sphinx
viscid raven
#

im really nudging that theres a syntax error but idk

warped sphinx
#

and the place you're teleporting to is in the same experience as the place you're teleporting from?

warped sphinx
young flare
warped sphinx
#

I'm honestly really confused. By all logic it should be working fine. The script has no problems, you're getting the id correctly, everything's published, and you're testing it in roblox

young flare
viscid raven
#

i really dont know what the issue could be, maybe this?

#

its probably not

young flare
viscid raven
#

yes

warped sphinx
young flare
viscid raven
#

try

young flare
viscid raven
#

well im also going to troubleshot since im also getting the error

warped sphinx
viscid raven
#

well i can thelp you

#

sorrs

young flare
#

Guys thank you for the help. Everything works now. If i will release it, you will be the first ones to test it 🙂

#

@viscid raven @warped sphinx

viscid raven
#

sure