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

Efficient way for getting mouse inputs in a FE game?

Asked by
T1mes 230 Moderation Voter
7 years ago

It is too laggy to pass inputs from the mouse in a local script to a server script with a while true do statement in FE games. Since it is also impossible to get mouse from a server script, I was wondering if there was any other ways for this? (P.S. I want mouse inputs for a part to follow the mouse in my FE game.)

0
What are you using the mouse input to do? BlueTaslem 18071 — 7y
0
' I want mouse inputs for a part to follow the mouse in my FE game.' @BlueTaslem General_Scripter 425 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

Make a compromise, have a delayed display for the other players but a fast display for the LocalPlayer. Update the position locally for the LocalPlayer and then fire an event which will move it on the server so it will replicate for everyone. This way the player moving the part will see it just fine and it won't really affect the other players too much. If the part moving is a major part of the gameplay then you could use a BindableEvent so you do client to client updates instead of client to server to clients, that's more direct so should be faster.

I can't really provide any code but I hope you understand the concept.

0
Client to Client events don’t exist. Dog2puppy 168 — 5y
Ad

Answer this question