Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What is the best way to produce a seemingly lag-free environment regarding an FPS game?

Asked by 6 years ago

The main question is how I handle projectiles. In this instance is lazers, and, yes, I have FilteringEnabled. If I have the server create the lazer then it appears a few milliseconds to a second behind, input lag. The only thing I could think to remove this is have the shooting take place on the client, then reproduce another one for other players on the server without having the shooting player see it. How would this be done and is there another way that is better?

1 answer

Log in to vote
0
Answered by
ax_gold 360 Moderation Voter
6 years ago

The way you suggested is certainly possible, but I think it might be even laggier than just sending it to the server. Either way, it's sending Data to the server, but with your suggestion, it's also sending data to every single client. In my opinion, I think the best ways to reduce lag are:

Use local when making values and functions. ex:

local v = true
local function change()
    if v = then
        v = false
    else
        v = true
    end
end

Try to refrain from using complicated scripts when constantly updating objects. Changing more things than Roblox can handle at once can cause lag, especially if you do it multiple times per second.

Don't use very large table values. Also, don't use multiple large objects in table values. Once I made a script that checked the distance between me and other parts, and it made my computer so laggy it had to reboot since I had it check so many parts over 50 times every second.

Well, those are my tips. I hope they help you.

Ad

Answer this question