I just finished this map for an upcoming laser tag styled game that I’m working on. I love the map and think that it came out pretty decent (considering that I’m new to developing). I’m able to run this map on max graphic settings but about a 3rd of my game testers said that the map was laggy for them. I really don’t know how to solve this issue. Any advice would be greatly appreciated.
Link To The Map: LaserTagMap1 - Roblox
Pictures Of The Map
Almost every part has a “Selector” inside of it (to create the outline effect)
A lot of the parts also contain multiple surface lights
Minimize the amount of unnecessary parts.
Also, when I played your game, the border was switching colors, you could possibly remove that.
Overall, I wasn’t experiencing much lag, my max ping was 56.7, but I have a good computer.
I have a 2080 and a 3700x and my fps can’t stay above 45 on that, so there is definitely a problem.
Have you tried seeing a difference by removing the selectors?
If not, try typing “Script” in explorer and deleting all of them and see if that makes a change.
(You can then revert this under “Version History” at “Configure Place”)
Part count shouldn’t be what’s causing your lag, the map is fairly small and not over the top detailed. I would suggest looking at your scripts for what is changing the lights on the bricks- are you using individual scripts per block or one single script? Perhaps post the code so we can look at optimizing it. That’s where I think the lag may be coming from.
Each part that has an outline has a selector in it with these scripts in them
while true do
script.Parent.Adornee = script.Parent.Parent
while true do
script.Parent.Color3 = script.Parent.Parent.Color
The loop isn’t stopping, and theres multiple, so thats whats causing the lag.
You could have one script, that cycles through each selector and changes their color, instead of multiple changing single selectors.
For example, if you put all of your selectors in a model you could do
for i, #selectors (workspace.selectorModel:GetChildren) do
selector.Color = BrickColor.new(color here),
Alternatively, you could just have a tween on loop which would not only make it a lot smoother, but more customizable and hopefully less laggy.
One of my favorite plugins to use for things like this is the Tween Sequence Editor