What do you want to achieve? Keep it simple and clear!
i want to teleport a player to a place in the experience
What is the issue? Include screenshots / videos if possible!
im recieving the error Argument 2 missing or nil on line 22
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
nothing i have tried has worked
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
the script is a server script btw
-- local ts = game:GetService("TeleportService")
local placeid = placeid
local plr1
local plr2
script.Parent.RemoteEvent.OnServerEvent:Connect(function(player, player1, player2)
plr1 = tostring(player1)
end)
local reservedserver
local s, e = pcall(function()
reservedserver = ts:ReserveServer(placeid)
end)
script.Parent.MouseButton1Up:Connect(function()
local users
users = {
game.Players[plr1],
}
ts:TeleportToPrivateServer(placeid, reservedserver, users)
end)