Can anyone help me with the script? The teleport is fine, it’s a teleport to another world in the same universe, everything is fine, but when I tried it and it led me to this “I tried to teleport to a place that is restricted” and I have permissions turned on. I can’t find the error
To explain better, it is a story game. I need you to get on a bus and wait to teleport to another world to start playing. I’m looking for a reserved servers so that anyone can’t join because it’s busy until they finish the game.
-
I want them to be able to teleport you to another world in the same universe
-
I’m sorry that there are strange texts in the photos, because the originals are in Spanish, I had to translate so you can understand it.
permissions activated
Places
Error
- I searched for all the solutions and included them on this page, it never solved the problem, my girlfriend also got the same error when creating a new world and following the same steps as any YouTube video and she got the same error as me
Here is the code just in case
local TeleportService = game:GetService("TeleportService")
while true do
for i = 15, 0, -1 do
script.Parent.Parent.Sign.Top.SurfaceGui.TextLabel.Text = "Leaving in " .. i .. " seconds"
wait(1)
end
-- Move truck
-- Reserve server
local players = {}
for i, v in pairs(script.Parent.Seats:GetChildren()) do
if v.Occupant then
print("Occupant found. " .. v.Parent.Name)
table.insert(players, game.Players:GetPlayerFromCharacter(v.Occupant.Parent))
end
end
if #players > 0 then
for i = 0, 150, 1 do -- Change 30 to the number of studs
script.Parent:TranslateBy(script.Parent.Hitbox.CFrame.lookVector)
wait(0.01)
end
local serverData = TeleportService:ReserveServer(15863585576)
local placeId = 15863585576 -- Cambia esto al PlaceId correcto
TeleportService:TeleportToPrivateServer(placeId, serverData, players)
for i = 0, 150, 1 do -- Change 30 to the number of studs
script.Parent:TranslateBy(-script.Parent.Hitbox.CFrame.lookVector)
wait(0.01)
end
end
end
I’m not asking you to write the code or anything like that, the only thing I’m asking is that you help me with the error in order to solve the error I’ve had since yesterday.