Exception while signaling: Teleport Service cannot be cloned

Hey there! I am a fairly new Roblox/Lua Developer, so I’d appreciate any Help from anyone.

I am currently trying to make a Script that Teleports the User from the Main Game to the Experience (Mission) the User has selected. However, instead I am met with the Error “exception while signaling: Teleport Service cannot be cloned” while playing on Roblox Player. I am unsure what I did wrong, since I am pretty sure I made no Errors.

Here is the Code:

-- Services
local ReplicStorage = game:GetService("ReplicatedStorage")
local TeleportService = game:GetService("TeleportService")
local SafeTeleport = require(ReplicStorage:FindFirstChild("SafeTeleportModule"))

-- Event
local TeleportEvent = ReplicStorage:FindFirstChild("TeleportEvent")

-- Place IDs
local Site29ID = 17036823509
local Area14ID = nil -- TODO: make place

-- Dictionary to Map Missions to Place IDs
local MissionMap = {
	["Site 29"] = Site29ID;
	["Area 14"] = Area14ID;
}

-- Function to teleport user
TeleportEvent.OnServerEvent:Connect(function(Player, Mission, Difficulty, ifSolo)
	local TeleportOptions = Instance.new("TeleportOptions")
	TeleportOptions.ShouldReserveServer = true
	
	-- Sets the ID
	local TeleportToID = MissionMap[Mission]
	
	-- Table with Data to send to the Server/Experience
	local TeleportData = {
		Difficulty;
		ifSolo;
	}
	
	-- Sends the Table to the Server
	TeleportOptions:SetTeleportData(TeleportData) 
	-- Teleports the User to Selected Mission
	SafeTeleport(TeleportToID, {Player}, TeleportOptions)
end)

How it (is supposed to) works:

  • The User presses the “Begin Mission” Button, which is connected to a Local Script. The Local Script fires an Event called “TeleportEvent” with the Arguments: Mission, Difficulty, ifSolo so an Example would be (“Site 29”, “Keter”, false).
  • The Event gets processed in ServerScriptService.

Regarding the SafeTeleport Thing, here is the Documention. I’ve added it as the Doc instructed, so I don’t think the SafeTeleport Function is the problem.

I was unable to find any other Discussions regarding my problem - I even checked StackOverflow. However, even when I do find a Discussion, it’s either telling me to Publish the Places (Which I did) and/or It’s just outright confusing to understand (probably cuz im stupid).

Again, help from anyone is appreciated.

Testing this in my own game resulted in no errors. Are you sure this isn’t a separate issue altogether?

I don’t know quite honestly. I’ve modified my code, published the experiences like 10 times, even asked Microsoft Copilot but I still end up with the same Error.

Odd. Try making a new game and test it there.
Show me the output while youre at it.

1 Like

So, I did that and it works
I am gonna assume that it’s because of the Event or Localscript that are causing the problem.
I’m gonna do more testing on the main Experience and come back

Regarding Output, there were no Errors

Alright, good luck. Regarding roblox, there are some cases where some things just break for certain games. Let me know what fixed it, once you do.

1 Like

After Debugging and disabling Scripts, I found the cause of the Problem
For some reason, the Local Script “TeleportSettingsScript” placed inside ReplicatedFirst were causing this Problem.

-- Script sets the Settings for the Teleport Service
-- Script by @WhereIs_MyFood

-- Service & GUI
local TeleportService = game:GetService("TeleportService")
local TeleportGUI = script.TeleportingGUI

TeleportService:SetTeleportGui(TeleportService) -- YOUUUU YOUU CAUSED THIS MISERY

Now with this assessment I am going to go fix this and cry.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.