Tried this already, same result. I’m going to keep looking through any code that changes the HRP position and get back to you.
I’d say that would have to be your problem, what happens if you add a very short task.wait() in there?
You should not use cframe:lookat, use cframe.new instead
Found no instances of other code tampering with the HumanoidRootPart position. Interestingly enough, putting it in a while task.wait(1) loop makes it work, but shortening that time makes it no longer work. I believe it is due to the HRP.Position variable not updating fast enough, therefore the player has to “backstep” a little bit. I’m not really sure how to fix this, and I think it may be more of a platform or script performance load issue.
CFrame.new(pos, posToLookat) is deprecated. I will try it, but I am trying to avoid using deprecated functions
Oh, I thought it was the other way around: CFrame.lookAt is deprecated and you have to use CFrame.new instead.
No, unfortunately not. Either way, using CFrame.new still gives the same issue.
CFrame.lookat is not deprecated according to the documentation.
It seems to almost be a sort of “Rubber band-ing” type of network delay issue, where the player sees themselves move before the server sees it.
That seems to be the issue. I was going to toy with networkownership, but that doesn’t work either. I know there’s other games that do it and it works perfect, so I don’t see what I’m doing wrong (unless they use some other unknown method). It’s worth mention that :PivotTo worked only once when I tried it, then stopped rotating.
You could maybe try some sort of modulescript placed in replicatedstorage that you can send the players positional data to?
That would only be slower, as then you have to handle transmitting and transferring data. I’m really lost here, maybe there’s some Roblox features I’m unaware of.
I’m going to try using a bodygyro and see how that works.
I suppose the next best option is a RemoteEvent, I was worried about network usage but Firing a Remote Event rapidly? - #19 by Avigant this thread seems to have people mostly saying it shouldn’t be an issue. not sure what else to try from here without exhausting the network.
what happens if you try renderstepped instead of heartbeat
You can’t use renderstepped in a server script. Either way, I fixed this by using a body gyro.
Alright nice, I have a question though why are you doing this in a server script?
The player rotation changing is a core element of the game. I would do it on the client, but I don’t see a reason to. Exploiters could easily change the code in the localscript and gain a huge advantage.
Couldn’t exploits just override that though, because the client has full control over their Character? Like just put a local script in your game that makes your character face your mouse hit each render step for example it will override your server code. Or what if you turn on AutoRotate locally wouldn’t that override it too? (I’m assuming u turn AutoRotate off so the Characters cant rotate using shiftlock)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.