Hello this is my first thread ever please dont judge me and I am not really sure if this is the correct place too, however since it can be related to coding and building, in the current time the game I made with my own is currently got a high lag Server not a client, means everyone lags too, the player max are 60 only in first place it was 100, then we reduced it till it became 60 since we cant make it lower more because the map is large
I’ve before checked the server memory it was like around 6k and I do not have any idea really what can cause it
I have been looking into devforum already but could not find any solutions, I’ve tried to added wait(1) to some stuff that can cause lag as I think the stuff that may happen in once which including:-
Team change GUI, simply when you click button it fire remote event you change your time, I thought it’d be the reason because might be many ppl clicking it on same time
-Selecting class GUI, it is some buttons when you click you get some weapons and we’re using a script to make it clone from server storage to prevent exploits, however I was thinking to use remote event to do that, idk if it can help reduce lag or not anyway
hey, I’m not sure if this has any relation to the whole building but if you have a lot of unions and assets made from Roblox Studio it could cause a lot of lag in-game. I suggest looking at the amount of parts and try decreasing it.
Ah yes that is why I’ve put buildings cause it may be a lot of parts since I am not really sure the thing cause it, and I don’t really know how to check the amount of parts
Not very correct, Debounce mechanism can be implemented anywhere you want, you can use it to prevent Remote spam , for instance like this:
local event = game.ReplicatedStorage.RemoteEvent
local debounce = {}
event.OnServerEvent:Connect(function(player, ...)
if not debounce[player.Name] then
debounce[player.Name] = true
print("fired", ...)
wait(0.5) -- delay
debounce[player.Name] = false
end
end)
Hello! I went to the game and discovered that the problem is that you have too many blocks and textures. I suggest removing blocks or textures that don’t need to be there.
The net can cause lag and so do all these other textures.
Overall I suggest using low-poly builds. Changing the sandbags into lumps instead of using textures mainly. The barrels, tires, shelves and boxes are also using textures here. I might be wrong.
We don’t really want to change to low-poly builds as it wouldn’t suit the art theme of the game, we will try reduce textures where possible, but the problem is script latency which I think is due to our code being messy, and using some opensource scripts for some things. We will have to look at the script memory usage more.
I might not know what I’m talking about but I can see that in this image the performance is the largest bar meaning that there are too many buildings and it doesn’t have to do with the script.
If it’s the buildings then this video will show you -
If it’s the script, this video should show you -
I still believe that you should try and remove textures or at least start everyone off in “Low Qualtiy” and instead of clicking the button for low quality it’s for high quality instead. This will make a better first impression of the game as well. Lag is not appealing.
Remove excess parts . A lot of parts can cause significant lag, especially on lower-end devices such as phones and tablets.
Remove memory leaks . If you have memory leaks in your game, lag will build up over time. This happens when you do not remove references to objects.
Remove excess textures and meshes . If you have thousands of textures, this can also cause lag. Make sure you use textures smartly and not for 6 sided objects.