Updating the position of the character also updates its orientation?

https://gyazo.com/d2eaaceaaa67beacdb56a157bef06105

I made it so that it’s literally just a teleport button and it does the same thing. Turns out changing the position does change the orientation to whatever the server thinks it is. VERY annoying and I can’t think of a way to get around it. If linearvelocity worked properly then I might’ve used that but it does a weird thing where if you add it to one player’s character on the server then every other player, as well as the server, will see them teleport at first for some reason. Maybe I could use a bodygyro somehow?

hm… Maybe?

local oldOrientation = root.Orientation

root.Position = Vector3.new(0, 20, 0)
root.Orientation = oldOrientation

tried that earlier, but it doesn’t work because the old orientation is still the one the server thinks it is so it doesn’t make a difference

Do you happen to have an Anti-Cheat plugin active? If so that could be interfering

but did you tryed save the oldOrientation before apply?

I have no plugins that are inserting scripts and yes @ashjdgsl

An anti-cheat plugin doesn’t need to insert a script for it to work

I’ll try to search to see if someone else experienced a similar issue and will let you know if I find anything

Alright thanks. Either way I have no anti cheat plugins or anything like that. Just UI/building/animating/rigging stuff

1 Like

weird… For me is working how should be. No idea what is going on

here my other solution: try make this script in ClientSide maybe can help. I guess

Yes it would work on the client side but I need it on the server side to make the hitbox accurate and stuff. I just expected updating the position to do nothing to orientation no matter what but apparently it does

should not happen that. this is really weird, no idea how help :frowning:

I found this that has the same problem you’re having:

It’s not a solution unfortunately but it has some useful information on how to combat it

1 Like

I’m gonna see how :TranslateBy() works in that baseplate and tell you what happens

1 Like

Now im just sad…


https://gyazo.com/5354fe0685a4cd6cc02d5d8bef633701
(it does the same thing no matter what vector3 I put in the brackets)

Try: char:TranslateBy(Vector3.new(0, 20, 0) - root.Position)

Yeah same problem happening. I don’t think there’s a solution where I only use the server. I think I’ll try having it get the orientation from the client or something. TYSM though

1 Like

At this point I’m starting to suspect that this could be some kind of bug since it shouldn’t make a difference on the rotation whether you change the position on the server or the client

I suggest you report this to Roblox just in case, and I also wish you luck finding a solution to this problem

1 Like

Alright I’m reporting it as a bug, but I get the feeling it’s been like this for a long time and has become expected behaviour or something even though barely anyone seems to be talking about it. Hopefully it’s okay tho and gets fixed. Thanks for helping

1 Like

UPDATE:
I managed to find a way around it. Basically, the server tells the client to, for a specific amount of time, send a certain CFrame in a loop until that time has passed. That CFrame is the CFrame of the camera IF it was facing forward, basically ignoring its X or Y orientation I forgot which one. You have to use the CFrame of the camera because the server is gonna mess with the character’s CFrame which will mess everything up on the client, so you need a more controlled CFrame that also faces where your character is facing and the camera is perfect for this (assuming you’re in shift lock, otherwise I just send the humanoidrootpart CFrame). THEN on the server, there’s a variable that stores the most recent camera CFrame sent. After that, I just simply move the character’s CFrame forward every frame using the lookvector of the most recent camera CFrame. The result is that the character moves forward in the direction it is facing on the client, with the downside of higher ping boosting you in a delayed direction, but the positive of your hitbox being more accurate from your perspective.

Idk if I’m gonna use this forever because I can also move the character forward on the client and extrapolate its position on the server to keep the hitboxes as accurate as possible, but this camera CFrame method works almost exactly how I imagined my original idea would work. Either way, I’m keeping your answer as the solution since the position changing the orientation is most likely a bug (which I found out I can’t report because you need a higher forum level or something…)
https://gyazo.com/29901010bafbc066803c8a66c4774f82 <— this is how it looks at 150-200 ping I think, because I was using the ping simulation thing at the time

1 Like

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