I was wondering, what would be the best way to go around handling multiple gamestates, such as build-mode, free-mode or menu?
If your game is larger you might find it helpful to have different place servers for each state.
That isn’t a solution that should be used. In no place is it reasonable to move a player to a new place to do a small touch up to their build.
Yeah I know, I didn’t know the nature of your game lol
for me its easier to keep it all on the server mainly for when the player tries to do something we can make sure that they are actually in that mode you could store it in a dictionary like this
local PlayerStates = {}
game.Player.PlayerAdded:Connect(function(plr)
PlayerStates[plr.UserId] = "Default"
end)
you could also do this in a module script and could easily be done with oop if that’s a thing you do
also don’t forget to remove the index when they leave because if they join back they would be in the previous mode