so I have a level transport system (this queues into lvl 1 and u go into lvl2 later…)
I want it to be to where when all players reach a certain radius of it all of them get transported into another reserved server
but I dont know how to make it to where it goes into a reserved server (players who go into it get mixed in with players in diff server instead of it being party based) (a nice fellow maked queue reserved server based… but the lvl transport he couldnt do…) pls help… im way novice scripter so saying answer wont help much… please give a simple fix/tips/referal to a vid
local telePart = script.Parent
local TeleportService = game:GetService('TeleportService')
local placeID = (13050238945)
local canTeleport = true
local function otherGame(otherPart)
local player = game.Players:FindFirstChild(otherPart.Parent.Name)
if player and canTeleport then
canTeleport = false
TeleportService:Teleport(placeID, player)
wait(0.3) --cooldown time
canTeleport = true
end
end
telePart.Touched:Connect(otherGame)
(if u have time make it to where after 1 minute of standing at exit it just transports all players but that would be ok if not)
im sorry I have 0 coding experience I sorta dont know how to do this and would like someone to like atleast do the reserved server thing… I can code the rest
local telePart = script.Parent
local TeleportService = game:GetService('TeleportService')
local placeID = (13050238945)
local canTeleport = true
local function otherGame(otherPart)
local player = game.Players:FindFirstChild(otherPart.Parent.Name)
if player and canTeleport then
canTeleport = false
local ReservedServerAccessCode = TeleportService:ReserveServer(placeID)
TeleportService:TeleportToPrivateServer(placeID, ReservedServerAccessCode, {player})
wait(0.3) --cooldown time
canTeleport = true
end
end
telePart.Touched:Connect(otherGame)
question, if not all players get teleported at once, (game is party based but rn not all players get teleported when 1 gets to the exit, will all of them get put in seperate reserved servers,??)
local telePart = script.Parent
local TeleportService = game:GetService('TeleportService')
local placeID = (13050238945)
local canTeleport = true
local FirstPlayer = true
local ReservedServerAccessCode = nil
local function otherGame(otherPart)
local player = game.Players:FindFirstChild(otherPart.Parent.Name)
if player and canTeleport then
if FirstPlayer == true then
ReservedServerAccessCode = TeleportService:ReserveServer(placeID)
FirstPlayer = false
end
canTeleport = false
TeleportService:TeleportToPrivateServer(placeID, ReservedServerAccessCode, {player})
wait(0.3) --cooldown time
canTeleport = true
end
end
telePart.Touched:Connect(otherGame)
I also asked other people to make it teleport all players but all 12 scripts they have sent never work… if u can make all players teleport when one player touches it it would be great! (also maybe put a – note where I could put stuff to happen before all players get teleported… like I could make a gui pop up saying “Myname got to the exit”)
Check if Thirty Part Teleport enabled, if no then enable it, and test it in roblox, not in roblox studio, teleport s are disabled in roblox studio.
Okey here is script:
local telePart = script.Parent
local TeleportService = game:GetService('TeleportService')
local placeID = (13050238945)
local canTeleport = true
local FirstPlayer = true
local ReservedServerAccessCode = nil
local function otherGame(otherPart)
local player = game.Players:GetPlayerFromCharacter(otherPart.Parent)
if player and canTeleport then
if FirstPlayer == true then
ReservedServerAccessCode = TeleportService:ReserveServer(placeID)
--you can put code for other thinks like this here, if you want to show first player who touched part
FirstPlayer = false
end
canTeleport = false
TeleportService:TeleportToPrivateServer(placeID, ReservedServerAccessCode, {game:GetService("Players"}:GetPlayers()})
wait(0.3) --cooldown time
canTeleport = true
end
end
telePart.Touched:Connect(otherGame)
Woot, that was fun! Not sure if the private server part works. Nothing to test that with.
But, I did test just a different server (then I took a line from mpc19801981, muahahaa).
-- non-local script in ServerScriptService
local teleportPart = game.Workspace:WaitForChild("TeleportPart")
local destinationPlaceId = 123456789
local privateServerPlaceId = 123456789
local teleportRadius = 25
local playersInRadius = {}
local function checkAllPlayersInRadius()
for _, player in pairs(playersInRadius) do
local character = player.Character
if character then
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
if humanoidRootPart then
local distance = (teleportPart.Position - humanoidRootPart.Position).Magnitude
if distance > teleportRadius then
return false
end
end
end
end
return true
end
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
table.insert(playersInRadius, player)
character:WaitForChild("HumanoidRootPart")
while true do
wait(0.1)
if checkAllPlayersInRadius() then
for _, p in pairs(playersInRadius) do
local success, errorMessage = pcall(function()
-- game:GetService("TeleportService"):Teleport(destinationPlaceId, p)
game:GetService("TeleportService"):TeleportToPrivateServer(privateServerPlaceId, "", {p})
end)
if not success then
warn("Failed to teleport player:", errorMessage)
end
end
break
end
end
end)
end)
All players need to be within range of the port part and it will port them all.
im getting very confused now… so this didnt even work… maybe u can send me a freemodel cause clearly something is wrong (every script I have tested doesnt work)
so I have been using a script for a bit thats made by another guy and it works… but when he tried to make it teleport all players in any way for everyone it just breaks the script
AND TO PROVE IM NOT DOING SOMETHING WRONG. I GET THIS ERROR WHEN I USE THE GOOD ONE (this means its actually teleporting Ik im getting a error it doesnt work cuz what its teleporting is private yada yada but u get my point it actually is teleporting)
You can edit both. Just tested them and they work as desired.
“Teleport to ReservedServer failed : HTTP 403 (Forbidden) already said this in my post”
Is what the popup said … F9 Logs will tell you way more information.
What is the use of putting together a full working example of this and you don’t even look at it.
Did you just want to pout or is the a joke …