Teleport To Other Place Doesn't Wanna Work

Hello Developers!
This Topic Is Typical Actually…
I Wanted Make a game with teleport to other place, but the game just ignores that when i step on the brick.
I dont know what is issue, but if you can then please help me.
The Script is:
local TeleportService = game:GetService(“TeleportService”)

local placeID_1 = 123

local function onPartTouch(otherPart)

local player = game.Players:GetPlayerFromCharacter(otherPart.Parent)
if player then
	TeleportService:Teleport(placeID_1, player)



By the way I Know that this topic were created a few times alredy, but When I Tried to fix that it wasn’t working right.

Make sure “Allow Third Party Teleports” is on in game settings.

i did enabled this alredy so this isn’t issue

Are you in studio or the actual game?

im in the game so thats not issue

Is there an error in your output?

no… the output says that this works.

wait it has some stuff but its too long

20:26:23.041 - Script ‘Workspace.Part.TpToGame’, Line 4
20:26:34.255 - Script ‘Workspace.Teleports.TeleportPad1.TeleportToGame’, Line 5

Send me a screenshot of your output so I can see the actual error.

ok sure ill do that.
just a moment please

the first screenie:

and the second one:

Can you post the script for the first error?

For the second error, you did Players.GetPlayerFromCharacter() not Players:GetPlayerFromCharacter(); the period and colon matters.

You didn’t define “otherPart” in your code.

Other Part? I Dont Understand.

i’ll swap the scripts and look if this gonna work.

here it works for me put this script in a part and make sure its not a local script or a module

    local TeleportService = game:GetService("TeleportService")
local gameID = 5874289066
function onTouched(hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
    if player then
        TeleportService:Teleport(gameID, player)

also change the id to your game

well… ok, thanks! ill try that!

did it work? and the part should be touched in order to teleport to the specific game

Yes! It Does! After Years Of Pain! (Don’t Ask)
Thanks You So Much!