I was making a party system using tables, but I realised I don’t know anything about tables. I did my research and found nothing.
It always results in not being able to find the room.
local rooms = {}
local function Setup(host)
print(host.Name)
rooms[host.Name] = {host.Name}
print(rooms)
end
createEvent.OnServerEvent:Connect(Setup)
local function Start(host)
print(host.Name)
if table.find(rooms, host.Name) then
TeleportPlayers(rooms[host.Name])
print("Teleporting players...")
else
warn("Could not find the requested room.")
end
end
startEvent.OnServerEvent:Connect(Start)
All events return in a player’s nickname btw.