Help with client animations

Hmm, there are actually multiple methods to handle this issue, if you research deep enough by looking in the toolbox and the community resources page.

The simplest way to do it which I find really creative is what the default-free model jeep this laggy thing which is really unoptimized because of the while true do loop.

In fact, the solution is similar to placing a server script inside a BasePart. For a local script, you just have to insert a local script into the places that you mentioned.

The jeep does this by giving the local script in players that detect the player input and controls the vehicle locally. No need to use an old drive tool like in some old Roblox games.

localScriptToClone = --path to the script in replicated storage

playerLocalScript = localScriptToClone:Clone()
playerLocalScript.Parent = player.PlayerGui
playerLocalScript.Disabled = false

Moreover, a huge benefit to this method is what you required with zero memory leaks because upon leaving the seat the script will automatically destroy itself removing all of its connections.

The downsides of this method are that you have to rely on the server to give you the script upon a seat which of course due to latency means there is a gap in time where you can’t control the car.

Otherwise, another option is to use remote events and I think you can figure it out from the dev reference API with the same methods. However, I believe the same cons still exist with latency.

There is even a third option to do it all locally which is what this IK procedural animation does to handle the expensive IK maths required to animate the legs, using workspace:DescendentAdded event to check if a humanoid exists or is spawned and if so then animate the legs locally in an animation queue.

Yeah lots of options, hope you look through them or even find another method suitable for your goals.

2 Likes