Place teleports cause crashes

  1. What do you want to achieve?
    Functioning teleports

  2. What is the issue?
    Teleports with TeleportService cause the game to crash, the issue persists on all platforms.

  3. What solutions have you thought of so far?
    None

Teleports in my game cause the Roblox client to stop responding and crash, this has been an issue for a while and I have still not found a fix.

Can you give me script otherwise this might be because to much ram is taken up or you doing the teleport in the loop.

Are you following roblox recommended guidelines for handling failed teleports as outlined in the reference?

1 Like

Could we please see the script?

Player = game.Players.LocalPlayer
PlaceID = 9765639548

script.Parent.MouseButton1Click:Connect(function()

	if game:GetService("RunService"):IsStudio() then

		script.Parent.Text = "CANNOT LAUNCH IN STUDIO"
		script.Parent.BackgroundColor3 = Color3.new(1, 0.666667, 0)
		wait(1)
		script.Parent.Text = "LAUNCH"
		script.Parent.BackgroundColor3 = Color3.new(0, 0.666667, 0)

		else

		-- Connect to server

		script.Parent.Text = "JOINING SERVER..."
		script.Parent.BackgroundColor3 = Color3.new(1, 0.666667, 0)
		game:GetService('TeleportService'):Teleport(PlaceID, Player)
		wait(10)
		script.Parent.Text = "FAILED TO CONNECT."
		script.Parent.BackgroundColor3 = Color3.new(1, 0.666667, 0)

	end
end)

No, I don’t think so. How could I change the script I made in another reply to follow these guidelines?

The ram in the game is 800mbβ€Ž β€Ž β€Ž β€Ž

This must be a bug with roblox.

Have you tried directly executing the teleport code in the command bar?

Try this (lets not use the pcall unless you get issues):

local Players = game:GetService("Players")
local playerToTeleport = Players:GetPlayers()[1]
local PlaceID = 9765639548
local TeleportService = game:GetService("TeleportService")
local RunService = game:GetService("RunService")

script.Parent.MouseButton1Click:Connect(function()

	if RunService:IsStudio() then

		script.Parent.Text = "CANNOT LAUNCH IN STUDIO"
		script.Parent.BackgroundColor3 = Color3.new(1, 0.666667, 0)
		wait(1)
		script.Parent.Text = "LAUNCH"
		script.Parent.BackgroundColor3 = Color3.new(0, 0.666667, 0)

	else

		-- Connect to server

		script.Parent.Text = "JOINING SERVER..."
		script.Parent.BackgroundColor3 = Color3.new(1, 0.666667, 0)
		TeleportService:TeleportAsync(PlaceID, {playerToTeleport})
		wait(10)
		script.Parent.Text = "FAILED TO CONNECT."
		script.Parent.BackgroundColor3 = Color3.new(1, 0.666667, 0)

	end
end)
1 Like