I am trying to make a party/matchmaking system for a game. Right now, this is the script for the creation of the server
main.Create.MouseButton1Click:Connect(function()
sounds.Click:Play()
if private and main.Private.Password.Input.Text == "" then
notification("error", "Invalid password for private game.")
elseif currentmap == nil then
notification("error", "No map selected, which is not supposed to happen. Please contact the owner if you get this warning.")
else
notification("success", "Successfully created a server!")
game.ReplicatedStorage.ServerSignal_Server:FireServer(main.ServerName.Text, private, currentmap, main.Difficulty.Dropdown.Text, main.Private.Password.Input.Text, game.Players.LocalPlayer.UserId)
script.Parent.Visible = false
script.Parent.Parent.InServer.Visible = true
end
--for any readers: notification is a function i made somewhere back in the script that isn't shown here
--Remote event passthroughs: Server Name, private status, the map, difficulty, private password, creator userid
end)
The server script just fires another remote event with the same variables passing through (fire all client)
And this is the other client script
game.ReplicatedStorage.ServerSignal_Client.OnClientEvent:Connect(function(ServerName, Private: boolean, Map: ValueBase, difficulty, PrivatePassword: string, creator: number)
local server = script.Parent.ScrollingFrame.Items.ServerChild:Clone()
server.Parent = script.Parent.ScrollingFrame
server.Visible = true
server.ServerName.Text = ServerName
server.Map.Text = Map.Value
if Private then
server.Joinability.Text = "Private"
server.Joinability.TextColor3 = Color3.fromRGB(172, 176, 198)
else
server.Joinability.Text = "Public"
server.Joinability.TextColor3 = Color3.fromRGB(133, 234, 106)
end
if difficulty == "EASY" then
server.Difficulty.Text = "Easy"
server.Difficulty.TextColor3 = Color3.fromRGB(171, 255, 115)
elseif difficulty == "NORMAL" then
server.Difficulty.Text = "Normal"
server.Difficulty.TextColor3 = Color3.fromRGB(227, 205, 41)
elseif difficulty == "HARD" then
server.Difficulty.Text = "Hard"
server.Difficulty.TextColor3 = Color3.fromRGB(227, 0, 61)
elseif difficulty == "VERY HARD" then
server.Difficulty.Text = "Very Hard"
server.Difficulty.TextColor3 = Color3.fromRGB(154, 21, 112)
end
server.Players.PlayerAmount.Value += 1
server.Players.Text = "[ 1/6 ]"
end)
This is all I’ve managed to get done, but I am stuck here. I have no idea how to load the information onto another frame (where it shows difficulty, players, and other stuff). I genuinely don’t know how to pull this off and I’m just stuck here. Basically, I want it so that when a player clicks the join button on the cloned “server” gui, a new gui appears and it applies all the information about the server they joined onto the gui. I’m pretty sure it has something to do with tables??
I also have no idea how to make the join button work. I don’t know how to make it interactable once it’s cloned onto the scrolling frame (there are no scripts inside the “server” gui where the join button is located).