Updating the position of the character also updates its orientation?

I am trying to make it so when I use this sword skill the character moves in the direction that it is FACING.

However, whenever I update the position of the character in order to move it forward, it ALSO updates the orientation for some reason. I want it to completely forget about orientation and ONLY update the position.

Here is the code


(as you can see, I am doing victimroot.Position = … so only the POSITION of the humanoid root part should be updating right???)

And here are gifs showing what I mean
https://gyazo.com/d41160c0f8dd1a7fa54d6da0724b3a1d
(when I am outside shift lock, I try to turn around while my position is changing but the orientation keeps resetting)
https://gyazo.com/f570bd1d461983a9bafad2ed48e7a650
(when in shift lock, I am turning around before AND during the movement so the delay between me turning on the client and it appearing on the server shouldn’t matter, yet the server is updating my orientation to stay the same… just like in the first gif. and obviously on the client I can’t see the server forcing me to turn around because of shift lock but you can tell it’s happening anyway)

I literally cannot find anyone with the same problem anywhere else. Most people probably move the character on the client, but I don’t want to do that because I want all players to see the character move at around the same time, and also moving them on the server makes the hitboxes much more accurate. All bodymovers including the new ones are also less accurate so I don’t wanna use them for this either.

I understand that the server does not immediately see the character turn around when you move on the client, but this issue doesn’t make sense regardless. It just shouldn’t affect the orientation at all. How do I fix this?

3 Likes

Replace the line with this and it should work:
victimroot.Position = start:Lerp(boost, dt/boostTime)

start will need to be the Position of the victimroot exactly before the loop starts running for this to work correctly and you’ll need to store the value outside of the loop too

1 Like

I put start outside the runservice thing and replaced the setting position line with the one you gave. It still updated the orientation no matter what I did. I think setting the position of the part always sets the orientation no matter what you do. I even tried replacing the boost with just a set destination like 0,0,0 and it still forced the character to face the last direction it faced before it started moving it:
image
(i had to change it to timepassed/boostTime btw)
https://gyazo.com/fbfc5454a057314c8d82e420facc600f

Setting the Position on its own shouldn’t cause the rotation to change, since CFrame is position and rotation at the same time not Position

I suspect another script is causing your problem and rotating the character to face an incorrect direction so I suggest testing the script in a new baseplate on its own and see if the problem still shows up


https://gyazo.com/313674c701c62a9bb031b754ece5f287
there are no other scripts on this baseplate. if you wanna try it yourself here is the file:
position affecting orientation.rbxl (54.1 KB)

Unfortunately I won’t be able to test the place file today because I’m on mobile at the moment, but to be honest I’m quite confused as to what could be causing your problem as I don’t see anything in the script that could be causing it to happen

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)