(Sorry for my bad English) Hello. I tried to make SpaceShip Escape Pods that will make player teleport to other game. I made pod model but in it, I couldn't make escape script that must do: Close door + teleport player to another game. It haven't worked inside pod but if I was out, it worked but player was outside pod. Here's my model parts screenshot: https://imgur.com/a/ayt4xXv
Here is the script I used:
local Part = script.Parent
local CD = Part.ClickDetector
local GameId = 331811267
CD.MouseClick:connect(function(Player)
script.Parent.Parent.DoorC.Transparency = 0
script.Parent.Parent.DoorC.CanCollide = true
script.Parent.Parent.DoorO.Transparency = 1
script.Parent.Parent.DoorO.CanCollide = false
game:GetService('TeleportService'):Teleport(GameId, Player)
end)
Is there any errors in the script or it is model glitch? What I doing wrong?

3 comments
Set an if statement checking if they are near a part in the pod model?
Oh. Okay. Thanks
could you accept my answer if it works'\