Solving this in my way would be, grouping a model in the workspace, and running a loop whilst getting all the players who are sitting on the chair, using:
game.Players:GetPlayerFromCharacter(seat.Occupant.Parent)
-- Just make sure you do a check like, if seat.Occupant ~= nil
Looks to me like a loading GUI with information on a map.
An efficient way I’d approach this is using a module:
return {
["Maps"] = {
['Arena'] = {
game_mode = 'Medium',
mutations = 'Standard',
description = '150 health, 60 waves. Average apocalypse for the average player.',
rewards = {coins = 88, exp = 175}
}
}
}
Well looks like it’s setting a reserved server, which is special from Roblox’s default server system, so all I am assuming is the GUI is changing the amount of people who will be teleporting rather than the reserved server’s actual size. Because theoretically reserved servers need a special key or something to be accessed from again.
Quick question for the module, how would I be able to add multiple maps options to the ui? Do I basically use the same concept of making a template and cloning it to match all the options?
Not really, you use a module with all the maps and its info (that only the client should see)
And then when the player presses on the gui, it just finds a random map and loads it’s info on the gui, doing this you don’t need to have a gui for each map
What I mean was create a template without ID’s and stuff, and create a folder containing all the values for each map and then cloning the template with a script like this
for i, tower in pairs(towers:GetChildren()) do
local btn = ui.background.template:Clone()
local config = tower:WaitForChild("Stats")
btn.Name = tower.Name
btn.Image = config.image.Texture
btn.cost.Text = config.cost.Value
btn.LayoutOrder= config.cost.Value
btn.Activated:Connect(function()
local spawn_grant = tower_request:InvokeServer(tower.Name)
if placed_towers < max_towers then
tower_place_hold(tower.Name)
end
if spawn_grant then
tower_place_hold(tower.Name)
end
end)
end