In the game I am currently working on, you can use a feature known as Quickstart. It lets you pick the dungeon, and difficulty, and when you do that, it teleports you instantly.I'm not sure what the best way to do this is, and I'm starting to just give up at this point. I have a script, but it says something about players needing to be an array of players, no idea what that means. If someone can help, please do. Here's my current script (not a localscript).
local TeleportService = game:GetService("TeleportService") local Place = 4506512824 local RSID = TeleportService:ReserveServer(Place) local players = game.Players:GetPlayers() local player = players.LocalPlayer script.Parent.MouseButton1Click:connect(function() game:GetService("TeleportService"):TeleportToPrivateServer(Place,RSID,{player}) end)
I dont think this is the right way to go with this, if someone could help, I would appreciate it.If its too much to explain in an answer, dm me on discord at aaw#6447. Thanks!
Script = a script that runs on the server. LocalScript = a script that runs on the client.
LocalScript:
script.Parent.MouseButton1Click:Connect(function() script.Parent:WaitForChild("remote"):FireServer() end)
Script:
local TeleportService = game:GetService("TeleportService") local Place = 4506512824 local players = game.Players:GetChildren() local remote = Instance.new("RemoteEvent",script.Parent) remote.Name = "remote" remote.OnServerEvent:Connect(function(plr) local RSID = TeleportService:ReserveServer(Place) local player = plr game:GetService("TeleportService"):TeleportToPrivateServer(Place,RSID,{player}) end)
Parent both scripts to the button.
Previous answer: Link