What does "raiseTeleportInitFailedEvent" mean?

Alright, sorry I am a bit new to scripting. Anyways, I am making a game where you teleport between places (see last post for more context) but when I click F9 when I didn’t teleport it says

– raiseTeleportInitFailedEvent: Teleport failed because The previous teleport is in processing (IsTeleporting)

I do know what this means (cant teleport because its already teleporing?) but how would I fix this? Sometimes it takes around 1 seconds, to 5 seconds, to - it doesn’t really teleport. Is there a way to make it faster? Make it be able to teleport right when the user clicks the button? Here is the code:


local id = script.Parent.id
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local button = script.Parent
local targetPlaceID = id.Value 

local teleportEvent = ReplicatedStorage:WaitForChild("TeleportEvent")

local function onButtonActivated()
	teleportEvent:FireServer(targetPlaceID)
end

button.Activated:Connect(onButtonActivated)

(script is from here because this was the first time I needed code like this)

Not really, if there’s already a teleporting that’s happening in the process there’s no reason to keep queueing the amount of teleports you’re wanting to do

Maybe first reserving a server would fix the issue, but I’m not exactly sure

1 Like