ill give you more context
im making a game kinda like mario 64 or odessey and i want to make a portal that teleports you to the second world but i want it so that you have to collect all of the start to open the portal
Can you send the teleport script and where it is located in the explorer? The best way to do this is probably to integrate the two scripts somehow but I won’t know how without the script you wrote
local TeleportService = game:GetService(‘TeleportService’)
local placeID = 8996667871
local canTeleport = true
local function otherGame(otherPart)
local player = game.Players:FindFirstChild(otherPart.Parent.Name)
if player and canTeleport then
canTeleport = false
TeleportService:Teleport(placeID, player)
end
You can probably have the portal part behind the door and then when the door opens you can just walk into the portal, that is unless you want to teleport instantly
As a failsafe, you could put them in the same script and only set canTeleport as true when all 5 models are touched.
MeshParts behave physically the same as a Part, the only difference is that they can be given a MeshId which makes their appearance that of a 3D model (usually made in Blender). If you want to read more, it’s best to look at Roblox’s own documentation here.
Just checking, does everything work now? The door opens properly and doesn’t give any errors? Just saying because, as mentioned before, I haven’t actually tested that code myself.
Put the teleport script under the portal and the door script in StarterCharacterScripts, alternatively you can combine them and put the singular script under StarterCharacterScripts. For simplicities sake, it’s probably easier to just do the first thing
Name the collectables TouchableModel in order to work with the script above, however you can name them whatever you want as long as you change the v.Parent.Name == ("TouchableModel") to the name of the models.