Tween not replicated on Server, CFrame not applying correctly

As the topic says, I’m currently encountering 2 problems,


(1st) First one, being Tweens not replicating on server, strange thing is, it’s Played on the server(since if it’s not played on the server it just don’t even work.) Here are some gifs demonstrating the problem:

Client-End:
https://gyazo.com/004d506d4527f7c85d66f7196944154b
https://gyazo.com/2cece1af6387c66ad1c6439ca85f0f5d

Server-End:
https://gyazo.com/ba7a42b076905449fa6af727e4d03467
As you can see, on Server, player starts spinning in circles for some odd reasons and complete goes out of control from there on(doesn’t replicate position/rotations at all).

Which leads us to the 2nd problem,


(2nd) Position not applying correctly, after the Tweens are played, player’s supposed to teleport back to spawn, but oddly enough, player doesn’t.
Demonstration:
https://gyazo.com/aff8d732c2984441fa20e847bcafedb1
https://gyazo.com/70cd00141640bc2598671d07b6ebe6b2

Even though on paper it does(i even printed the positions out to make sure, and on paper they’re the same),

but it seems like everything’s just broke, from there player’s character on the server just gives up replicating and starts moving to random places following the smallest movement on client-end(meaning a small movement can send the server-end to far extended axis).
Demonstration:
https://gyazo.com/d19b28709efb9f3a73d61bd500ace108


I can’t seem to figure non of these out, I’m pretty sure it has something to do with Welds, since as you can see from the gifs, player has a Bike and a Sphere welded to him, I tried changing the properties, but non of them seems to fix both of these issues.
I have completely no idea what’s causing the Tween issue, but for the Positioning Problem, it seems like the player’s parts are just welded SUPER FAR away from the HumanoidRootPart, which is causing the odd movements, the whole thing just becomes a HUGE MODEL(the parts becomes super far away from the core, hence the whole model gets big), and I have no scripts doing that, I use PivotTo() to set positions btw.

If anyone can help me out that’d be greatly appreciated.

2 Likes

Maybe a problem with the network ownership?
Who is the network owner of the bike and the sphere?

2 Likes

I think you should know about Network Ownership | Documentación del Centro de creación de Roblox, and maybe give the sphere ownership to the player and then let client move the part, and will be replicated in the server, even the weld, and dont move the part from the server and the client at same time, its looks like the client should manage this work

3 Likes

Hmmm, excuse me if i did not explained it well, first, player’s character owns the sphere, im pretty sure also the ownership, i did not set it tho, so imma give it a try, and second, sphere is never moved alone, all of the parts are under the player’s character, either welded or rigged to the HumanoidRootPart, the Tweens are played for the HumanoidRootPart not for any other parts(hence might be causing the issue) and only by server, so its not the case you’re saying im playing it on both server and client(don’t know what caused the assumption), lastly, playing this tween on client only moves HumanoidRootPart, and not the parts that are connected to it, plus not just solving the issue, i more so wanna know what is causing the problem(why are tweens not playing correctly & and model not positioned correctly), but im definitely gonna try and set all the ownerships of the parts ig

2 Likes

Update: tried setting all the part’s ownership to player, doesn’t work.

Update: I removed all the welds but still the problems both persists.

So, turns out, to tween the whole player’s movement, I cannot tween it’s(HumanoidRootPart) position, I have to tween the CFrame, doesn’t know why, but there it goes.
Changing this single line fixes both of the 2 problems mentioned and all the weird glitches that comes with them, honestly still don’t know why, but ig this is it.

Old Script:
local goal = {
Position = NewTweenToPosition
}
New Script(Fix):
local goal = {
CFrame = CFrame.new(NewTweenToPosition)
}

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.