Smoothing of Motor6Ds?

What do I want to achieve?
I want to have my Motor6Ds slow their speed down before it hits a certain radiant. ( math.rad() )
Motor6Ds do not have a smooth stop, that’s why I want to achieve this smooth stop.
I’ve tried using TweenService before, but it creates an EXCESSIVE amount of lag on the Moving Heads. (not FPS).

Example:


My Moving Head


Location and path to the motors:
image

Example script of how I make the Motors move:

workspace.Ta1.Motors.Tilt.DesiredAngle = math.rad(125)
workspace.Ta1.Motors.Pan.DesiredAngle = math.rad(45)

How can I achieve this, like shown in the two video examples, they do not use TweenService to make that happen, neither do I want to use TweenService as it creates a massive amount of lag, even on my friends.

2 Likes

Getting views, but no reply. I need this asap.

1 Like

What you could do is have everything client-sided to avoid server lag. With that control panel you have there, you can have it send client events to all players and have the tweenservice be handled on the players computer instead of the server to avoid lag
This solution might be prone to exploits though, just a fair warning

FireAllClients() is relatively safe, you’re just transmitting instructions/information from the server to each client, how they react will only replicate to themselves.

1 Like

That’s not the point.

The actual heads, lag, they stutter whenever over 24 instances are being fired at once.

1 Like

In the videos you attached, i didn’t see any stuttering or lag to the heads. Could you try attaching a game link for better inspection?

1 Like

@Luhkaaa If you use TweenService you can change the style to quad and the direction to InOut this will give you that smooth effect you want.

1 Like

Because the people who are behind the video, told me they do not use TweenService for this.
Obviously it wouldn’t lag, as there aren’t that many instances, considering that my system can go more than what they can, their’s has a maximum.

Oh, I see. Using tweenservice excessively will definitely lag them.

Here is another solution you could use if you are insistent on not using tweenservice.
Simple alternative for optimization instead of using TweenService (explaining interpolation) - Resources / Community Tutorials - DevForum | Roblox

Check out this thread from 2020, and maybe try out something like TweenServiceV2. It’s similar to my solution, but according to the thread, it is good for mass tweening.

I know the original post asked for no tweenservice, but using tweenservice is the best bet for you. doing anything else would be less efficient and most likely cause much more lag than you already have.

1 Like

I would like to see examples on both. the lights using TweenService lagging, and the main post’s videos at its maximum

I would like to, if my Studio does not crash each time I run the server.

Run the game on Roblox’s server using Team Test or on the Roblox client (not studio) instead of having the server run on your computer.

Even if I showed, my laptop is trash, the recording is extremely laggy, although the games aren’t.

This happens everytime, so of course the recording would appear as laggy.

Sometimes as I experienced no stutters, but some beams delayed or behind.

https://gyazo.com/c3b1296515afea0cc62e6da80cdfa07d

Some beams behing behind is not normal, as all of them are called at the same time, this is a stresstest I usually do before putting them to the public.

Which solution is this video using? The TweenService?

No… the video does not use TweenService, since the last time i showed it, they asked me why I am tweening a Motor6D.

They’ve said this:

What your friends could be describing is PI(D) control.
PID control pt. 1: Proportional Control - Resources / Community Tutorials - DevForum | Roblox
Give this a read, and do some research on what a PID controller is. This wikipedia page is really good at explaining what this is, alongside that forum post.
PID controller - Wikipedia

Here is a PD example with Motor6ds. I believe it uses the TurretController Module, which is probably very helpful in your case.

Again, this could cause much more lag and cause alot of complexity at this scale. I highly recommend you stick with client-sided tweening/lerping.

1 Like

well then just lerp the desired angle and it should work. look up the lerp function