I am making a pending hub with 3 servers that you can create, join and shutdown. The pending hub includes a menu where you accept/decline users to join your server.
The current issue im having with accept/decline functionalities is that Roblox seems to just ignore the lines with GetAsync OR Teleport Service.
local index = Info.Player.Server -- The index of the server im trying to accept,
-- stored in a table that approx looks like this,
{
["IsInGroup"] = false,
["IsRaider"] = true,
["Server"] = 1,
["UserId"] = 99999, -- example
["Username"] = "lmaoes" -- example
}
local s,e = pcall(function()
local server = storage:GetAsync("ReservedServer"..Server) --
local tp = CreateTP(server["AccessCode"]) -- CreateTP is just a function that creates tp options with the specific access code
tpservice:TeleportAsync(game.PlaceId,{game.Players["lmaoes"},tp) -- Teleports the user
end)
Any code ran before or after this part works, I also tested with dev console and it teleports successfully, with arguments typed out manually, but not in game.