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

How would you use filtering-enabled for a loop function?

I am an intermediate level Roblox-Lua programmer (on and off for like 6 years) so I know how filtering enabled mostly works, but I am struggling to adapt a game to filtering enabled in one aspect.

I basically have a looping while() function (that normally can run on the client since it loops that client's specific model in-game) but since you can't change a model's CFrame from a client-sided script with filtering enabled, I need to adapt that specific loop to be able to run on/from the server. My question is: How should I go about making a looping function that relies on player input [ from :GetMouse() ] to run on the server?

I understand that I can simply make the loop in the client and just 'send' a FireServer() request every wait(1/30) **but **that threatens to lag my game up when I will have up to 16 players requesting a server script 600-1800 times a minute. So I need an efficient way of doing this.

1 comment

0

The only other way to do it that I can think of is to send over relevant player input to the server. Without any source code, I can't tell you exactly how to go about implementing this though.

1 answer

✓ Accepted answer

Tell it every 1/5

The other clients don't care about the animations. Let the server know often enough to tell the other clients that stuff is happening, and then just lerp it on the other clients - If it doesn't affect you in some way, the need for replication fidelity is reduced.

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