Hey! I am tweening the C0 value of a weld in my game and I am doing this through the client. Every time it reaches the end goal of the tween and goes onto the next one, and just in general throughout the tween, it is really really glitchy.
It does not do this if I use WeldConstraints but I can’t use them as I am tweening 2 other parts that are all connected to other tweened parts.
When I try it in game, it is no where near as bad, but still noticeable and not as smooth as I would of liked it.
This seems to be an issue with client-server replication try using; BasePart:SetNetworkOwnership(Player?). Try setting the player argument to the player sitting there and that might work.
I would use Tween.Completed but i cannot due to my local tweening system.
I will try out the lerp system in the next couple of hours and see if that works, I have always wanted to use lerp but never really understood how I would make it come to a smooth stop etc.
local RPS = 1 -- Rotations per second
Runservice.RenderStepped:Conncect(function()
Weld.CO = CFrame.new(partPos) * CFrame.Angles(math.pi*2*RPS*tick(),0,0)
end)
-- math.pi*2 is the equivalent of 360°, but in radians
This updates the position of the part every frame (similarly to how Empeareans did it, but without lerp), but my way and, by using tick(). tick() returns the unix time (in UTC), and is about the same for everyone, HOWEVER, tick() apparently has a different behaviour depending on the client’s platform? Idk, anyway, you can use another way of getting the unix time in UTC, I made a module just for that: Reliable time module (alternative to tick())
Using tick(), or my module, can lead to some differences between clients, if their system’s clock isn’t synced perfectly. In your case, it might be fine, but if it isn’t it is possible to get the time from the server to synchronize the client’s clock (I have an updated version of my module that those this synchronization when the client joins, and I am able to get the time synced really well)
the part looks like it’s anchored so that wouldn’t work. if it was unanchored the property wouldn’t replicate, and even if it did, the client has network ownership while the server is trying to set the value so it would just be even more jittery