So, I'm trying to make a simple Roblox game similar to Epic Minigames in which a random minigame is picked and players must complete it. It is very incomplete so far and I am having problems with displaying the GUI to players. After calling the chooseGame() function the GUI should show with the game chosen. However, it doesn't, no matter what.
chooseGame() function snippet from a server-side script in ServerScriptService:
function chooseGame()
--TODO: math.rand() + if statements for each minigame
gameChosen = "BombSurvival"
for i, player in pairs(game.Players:GetChildren()) do
game.ServerStorage.BombSurvival:Clone().Parent = player.PlayerGui.ScreenGui
end
end

2 comments
Ah, I see. It's part of a big script with quite a few edits to the Workspace so I'll just create a seperate local script.
Looks good but Note: The remoteEvents/Functions that you are firing are supposed to make changes to the Workspace and not player-based things.