Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make my game stop flashing and stop lagging?

In my game: It's very laggy and it flashes which means You can't see stuff when you walk around like Someone can be at the Hospital in my game on my screen and they are shooting my tires and pointing in first person in the other direction can anyone tell me a anti lag script and/or something to make the game stop flashing invisible for a second?

4 comments

0

I'd recommend grouping all your stuff and waiting a little bit before you move so everything loads fine. Also, i don't think anti lagg script work.

0

I recommend not using free models.

0

Search for infections in all of your script, press control f and search "infection" or "Virus" or any sort of weird name...

0

If you've used freemodels(any models from the "Toolbox") then I'd recommend using https://www.roblox.com/library/151970737/Zephs-Anti-Virus-Plugin-V1-1 to clear some items that may be causing lag.

1 answer

I reccomend unioning stuff. Unions make mutiple parts into one, so there is less things ROBLOX's physics engine needs to handle and load. I also recommend if you use free models, cut out all the stuff you dont need. Dont use waits in loops like wait(0.00000000000000000000000000000000000000000000001). Computers cant handle stuff that fast. Also, you should see this. Also, use debounces in events like .Touched and stuff, as they dont need to be run a million times. Heres a recap:

--Dont do this

while true do
	wait(0.0000000000000000000000000000000000000000000000000000000000001)
	print('This lags the server!')
end

or keep things in free models not needed, see this, and use debounces like this

local debounce = false
workspace.Part.Touched:connect(function(touched)
	if not debounce then
		debounce = true
		print("I got touched!")
		wait(1)
		debounce = false
	end
end)

1 comment

0

I also reccomend checking free model's scripts for anything fishy.

This discussion is preserved as it was. New answers, comments, and votes are closed.