Hi, Im trying to make a roblox game that has different modes, when a player starts the game, I want a menu to pop up and they select a game mode, this will then create a new server based on the gamemode selected, how should i go about doing this (i know how to make the gui, its the server creation im struggling with)
If your game is FilteringEnabled, use a RemoteEvent. I don't know the layout you want it to be like. Let's say you have a frame holding all the TextButtons that the player is to press, we'll have to create a remoteevent.
--Server Code local re = game.ReplicatedStorage.RemoteEvent local gamemode re.OnServerEvent:Connect(function(player,txt) gamemode = txt print(txt) end)
--Client Code local gmbuttonframe = script.Parent local re = game.ReplicatedStorage.RemoteEvent for _,v in pairs(gmbuttonframe:GetChildren()) do if v:IsA('TextButton') then v.MouseButton1Down:Connect(function() re:FireServer(v.Text) end) end end
Everytime, you click a button on the frame, the server sets the 'gamemode' variable to the text of the button clicked. If the player pressed a button that's text is 'Free - For - All', the server will print 'Free - For - All' in the output.
My roblox profile : https://www.roblox.com/users/273093957/profile