Error while trying to teleport

Hello devs! I’m currently trying to make a part that teleports you to another place

Here’s the script:

local bool = false
local tp = game:GetService("TeleportService")
local PlayerToTp = {}
local tpOptions = Instance.new("TeleportOptions")

script.Parent.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") and game.Players:GetPlayerFromCharacter(hit.Parent) and bool == false then
		bool = true

		local info2 = TweenInfo.new(1, Enum.EasingStyle.Linear)
		local tween = game:GetService("TweenService")
		local info = TweenInfo.new(2, Enum.EasingStyle.Linear)
		
		for i, plr in pairs(game.Players:GetPlayers()) do
			task.wait()
			table.insert(PlayerToTp, plr)
		local character = plr.Character
		local gui = plr.PlayerGui.LevelGui
		local frame = gui.Frame

		if plr.Level.Value <= 1 then
			plr.Level.Value = 2
		end
		
		local Tween1 = tween:Create(plr.PlayerGui.TransitionGui.Frame, info, {BackgroundTransparency = 0})
		Tween1:Play()

		end
		tp:ReserveServer(6934133494)
		
		tpOptions.ShouldReserveServer = true
		tp:TeleportAsync(6934133494, PlayerToTp, tpOptions)
	end
	end)

But I keep getting this error:
Captura de tela 2024-12-17 181559

What do you mean? I didn’t understood

403 Forbidden means with the credentials you provided, you aren’t allowed to access whatever you’re trying to access.

lol, I got 4 Solution posts (somehow) for this reply and ened up with a heart… :rofl:

1 Like

Guys, I’ve managed to change the place id, now it’s working, thx

1 Like

I see two problems within your code directly related to the failure of TeleportService:ReserveServer. To begin, HTTP 403 is a web status code meaning “forbidden”, which is in line with the function’s documented behaviour given the specific context:

Studio Limitation
This service does not work during playtesting in Roblox Studio; to test aspects of your game using it, you must publish the game and play it in the Roblox application.

Finally, you’re trying to reserve a server with a universe id. The documentation for this function states that a place id must be given. I was able to track down the root place for your given universe id: Level 1 - Roblox

1 Like

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