Need help with a Map Changer (for gun game)

I’m currently working on a simple gun game that is not meant to be realistic in any way, as it’s more on the “wacky” side of games. This is due to the maps being mostly fictional, and the fact that you’re given the ability to emote on people after shooting them since they’re forced to see you from the kill cam.

Everything is working perfectly fine, but I would seriously like to upgrade the way that the maps cycle since I’m using a map changer script from almost 10 years ago. The way it works is simple, as all it requires is for your maps to be models that are placed under “Lighting” with the names “Map1”, “Map2”, and so on. The only other thing you need, is the following script, which I only altered the wait times and map names of, but this is how it looks like:

while true do
	game.Lighting.Map1:clone().Parent = game.Workspace
	wait(300)--Change this to the time between each map.
	local msg = Instance.new("Message")
	msg.Parent = game.Workspace
	msg.Text = ("Loading Map: Colorway Complex")--Change the Map title.
	wait(3)
	msg:remove()
	game.Workspace.Map1:remove()

	game.Lighting.Map2:clone().Parent = game.Workspace
	wait(300)--Change this to the time between each map.
	msg.Parent = game.Workspace
	msg.Text = ("Loading Map: OOF Battlefield")
	wait(3)
	msg:remove()
	game.Workspace.Map2:remove()
end 

My problem isn’t the script, since it works fine. The actual function of it is not the most pleasing. It uses a message that appears on-screen, which is a simple distraction that could definitely look neater. I don’t want to use hints either, since they’re old.

This is how the message currently looks like in-game:


This is proof that the script works:

My goal is to have a nice TextLabel that appears on the top of the screen with a warning that tells players that the map is going to change soon, with the name of it as well. I would also like to clarify that adding a visible timer is not of my concern, as this is not a round-based game. The only thing I want is for the maps to change by being randomly selected.

The last issue would be actually teleporting to the map. Currently, all of the maps are built on a baseplate that is on the same exact position for players to get on the field easily. The only problem with this is that glitching into walls is not that difficult and can happen to anyone, demanding them to reset their character or get killed, causing them to lose their streak (just for accidentally staying in an area where glitching is possible). What I’m trying to say can be visualized in the images I posted. If I was standing on the area around the crosswalk in the first map, I would’ve actually glitched into the red wall on the second map. I don’t know how to solve this, but I know that it’s possible for players to teleport to the selected map’s spawn locations. This will prevent all players from accidentally glitching, and allow them to start off in the new map on an actual spawn point, perfectly continuing the game. I just don’t want players to have to reset every instance that the map changes, since that will restart their streak on the leaderboard.

I’ve tried various types of map changing systems, but they’re all usually meant for minigames, and this is not one of those types of games where if you die, you go to the lobby. You’re always in combat as soon as you get into the game.

Thank you so much for reading the problem I’m currently facing with my game, I greatly appreciate it. I would love to hear the types of replies and solutions I get, as this is my very first post on the Roblox Developer Forum! I got accepted into it today, and this is a game situation I couldn’t wait to share. Again, thank you.

1 Like

For this I would use a TextLabel which could place anywhere on the screen and is a lot more customizable. For instance for my game which is similar to the one your making uses a GUI.


Hope I could help, :roblox_light: ICrann

1 Like