For an RPG I’m making, I need the player to be constantly looking south (this is for something in the future), so I’ve tried some methods, most of them have their problems, like being able to still wiggle and face other directions.
Currently, this is the method I’m using
local function onRenderStep()
-- Some code above here...
local currentPosition = humanoidRootPart.Position
local targetPosition = south.Position -- South is a predefined part
humanoidRootPart.CFrame = CFrame.new(currentPosition, targetPosition)
end
-- Binding the function to renderstep
This is the problem when using it though
As you can see, when moving I am constantly going backwards.
A few things that might cause this but I’m not sure:
Baseplate is at a tilt of 28, 0, 0
South is straight with no tilt
I don’t think any of those are the culprit, but I just wanted to put it out in case.
If you think you know whats causing this or know an alternative to this that does work please let me know!
Couldn’t you just disable the Humanoid’s AutoRotate property and set where you want the Character to look at?
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local HRP = Character:WaitForChild("HumanoidRootPart")
local south = workspace.South
Humanoid.AutoRotate = false
HRP.CFrame = CFrame.new(HRP.Position, south.Position)
This property basically determines if you want your Character to rotate at all, if it’s set to false then the Character would only move in the current position it’s looking at
I believe why it’s moving upwards is cause you’re encasing it inside a RenderStepped event, so it’s constantly moving every time perhaps?
The only thing I could think of is that you have some kind of Velocity property that’s assigned to the Baseplate, or you’ve welded something to it then
A Baseplate shouldn’t just slowly move your Character though
South.Position will return the absolute middle part of south, with can end up being “downwards”, as the map is tilted. This causes the player to try to move downwards and forwards messing up the original goal. Is there any way to instead of going to a part, going to "Due South"
Red = South
Blue Dot = Middle
You can see that middle is upwards and the player can’t reach it
As @JackscarIitt said, you probably have a Velocity in the Baseplate.
And your information is misleading. Up is a direction vertically. Your video shows you are moving backward in relation to your character.
Can you at least double check that the AssemblyLinearVelocity properties are all set to 0? If this only happens in the Baseplate alone and not in another part, that’s probably why