#Lobby system
1 messages · Page 1 of 1 (latest)
Lobby system can be a little complicated
Game state manager/module
It says when the players are for example
Voting
Intermission (buying upgrades waiting joining etc)
Playing
Then in your scripts you can refere to what state the game is currently in
I spawn an NPC when it's intermission time
Then destroy him when voting starts
I turn on the voting buttons when voting starts
So I highly recommend implementing a game state module
What specifically are you battling with
Like what @whole acorn said, it's a bit complicated, but primarily because each lobby is different for different games.
Ok
Thank you
I will try my best to figure it out
The common approach you see are party games. These games typically have ~ 3 states for their lobby.
- Intermission
- Voting
- Loading
And other lobby systems, such as TDS or Doors uses a elevator or ui apporach where you can create party's/rooms to add people into the game and teleport them to a different place
This system isn't complete black and white so some information would be needed on what you plan to make
@fathom idol What type of lobby system are you planning to make?
A lobby system that just takes you to a game
It will be pre coded and don’t matter if it’s with 1-4 people
It will be the same
Ok so something similar to doors?
Ok so you want to make more of a party/room system
I guess
so a party of people can be sent to a game at once bvasically
you sound really new so let me think of a simple approach you can do to make this system
But correct me if I'm wrong
Do you want elevators (or something similar) or ui party
Just a lobby where you walk into the wall and it teleports you into a box
When you learn from tutorials, try to understand what the person is doing. Don't copy someone blindly. If you watch a video tutorial, try to make sure you understand 80%+ of what the topics they talk about
Dang it
** You are now Level 1! **
If you want I can send a picture of what my lobby goal is
I'll be honest I think you should just mess around with an easier version first
You are jumping the gun with a lobby system, you could improve faster working on basics
For my lobby system it just loops through intermission voting and playing by waiting time out rather than a whole lobby doors setup
And what it so far looks like
you get teleported in a different game
I do have a goal and know how to do somethings from practice
Yeah even using other places can be quite tricky
@fathom idol get proficient at arrays and dictionaries
Kinda like doors lobby it takes you right to the game
What’s that
Here is a good way I thought of to make a elevator type lobby system
Each elevator will contain a list of all active player's inside
-> if elevator is empty, do nothing
-> if a player collided with a hitbox within the elevator, add them within the list
-> start a timer
-> if the max amount of players join elevator, make the timer 5 seconds
Very simplkistic but that is the simplest way I thought of making one
Won't that require a spatial query?
No
He can do a simple .Touchded event
Can I show you what I’ve got so far. I don’t know what I’m doing but I’m following a totorial
Tutorial*
Sure
bro what the hell is this
Idk
win+shift+s for screenshot 😭
I can’t
why'
well I can't help with this, sorry
I imagine the floors have touched events
Using a string value for a timer for some reason
It’s basically parts
That’s it
And a folder with nothing in it
You don't have a script using the floor?
no scripts?
The only script I know is how to press a button
It’s pointless I’m just going to give up
** You are now Level 2! **
W mindset
It’s just too confusing for me
refere the floortouch parts
ill use Duo as an example
local Players = game:GetService("Players")
local playersList = {}
local DuoFloor = workspace.Duo:WaitForChild("DuoTouchPart")
DuoFloor.Touched:Connect(function(hit)
local character = hit.Parent
local player = Players:GetPlayerFromCharacter(character)
if player and not table.find(playersList, player) then
table.insert(playersList, player)
print(player.Name .. " touched DuoFloor!")
end
end)
ur new bruh what did u expect
You don't learn how to code in a few weeks
youve completely skipped the basics lol
It takes time
What a good way?
Is a part that follows you and will kill uou if it touches you, that has pathfindiny hard but will go the opposite direction to of you and go to the nearest player hard?
Like cheese escape
https://www.youtube.com/watch?v=evBhoqeYegQ&t=138s&ab_channel=MonzterDEV
this is exactly what i did
i followed this youtube video using a external module called "profile store"
then you can start saving player data
make a simple game
place balls in a folder around the workspace
make a server script and have it so when you touch a ball it adds the ball to your data
so player.balls = 1
thats how i started
But with a part?
I can manage with a kill script
the pathfinding, maybe u can find a module for that
there is little to no point jumping to pathfinding icl
** You are now Level 23! **
its the small things he needs
ye
no
Like a simple one
combat or guns is hard
Click and part moves then kills?
physics
That hard?
thats not how guns work in roblox
its not those topics thats hard
Ok
if you do the ball game i will dm and help you through it
--// Services \\--
local Players = game:GetService("Players")
--// Settings \\--
local MAX_PLAYERS = 4
local TIMER = 30
local MAX_PARTY_TIMER = 5
--// Stuff \\--
local Party = {}
local Timer = 30
--// Elevator Stuff \\--
local ElevatorHitBox = ...
--// Private Functions \\--
local function isPlayerInLobby(Player): boolean
--I dont want to do this rn, but pretends it returns a bool
return false
end
--// Signals \\--
ElevatorHitBox.Touched:Connect(function(TouchedPart)
if not TouchedPart.Parent:FindFirstChild("Humanoid") then return end
if isPlayerInLobby(Players:GetPlayerFromCharacter(TouchedPart.Parent)) then return end
--Inefficient to do find the player from character twice
table.insert(Party, isPlayerInLobby(Players:GetPlayerFromCharacter(TouchedPart.Parent)))
--Check if the player leaves the games to remove them from the list
end)
while true do
task.wait(1)
if #Party == 0 then continue end
Timer -= 1
--Lazy to do logic
end
What your time zone? I’m est
BST
Ok this is what I was talking about for the lobby system, not perfect and rushed some of it
i meant raycast OR simpler, velocity
But if u learn the basics you should understand this
it is 2:38am 😭
Oh
yep this is a bunch of basics done very well
you can absolutly understand this devo with some time
yeah dw watch the video i sent when you have some spare time
it will teach you how to setup what you need then from there i can help