My game has extreme lag and is unplayable, I do not know why. I have looked through the scripts and nothing seems like it would cause this. Note: the game was made over a year ago, maybe some changes have been made to roblox?
It could be that your scripts in the game are running too many processes at once. I doubt it has to do with the parts in your game as (at least surface level) everything looks pretty simple and easy for the Roblox Engine to render. I’d suggest opening the Script Performance tab in Roblox Studio, then playtesting to see if any scripts have a large Activity percentage.
This is a bit hard to figure out, but going off the microprofiler, the issue is definitely related to rendering:
rendering alone takes 14ms, while at 60 fps each frame is 16ms - meaning 14ms alone is spent on rendering here. To make sure this is 100% not a script, you should try copying just the map onto a separate test place, and run this code in the command bar:
game:GetService("ChangeHistoryService"):SetWaypoint("Remove scripts from workspace")
for _, Script in next, workspace:GetDescendants() do
if Script:IsA("LuaSourceContainer") then
Script.Parent = nil
end
end
Do you use any meshes in the game? Even if the part count is fine, some meshes could have extremely high tri-count. Roblox limits at ~20k tris per mesh, but if you have a lot of those meshes, it could become an issue.
game:GetService("ChangeHistoryService"):SetWaypoint("Remove meshes")
for _, Object in next, workspace:GetDescendants() do
if Object:IsA("MeshPart") then
Object.Parent = nil
end
end
Additionally, do you lag in studio when viewing the map?