hi!
I want the character to stop rotating with the camera when the character is moving any idea how to do that?
Example:
hi!
I want the character to stop rotating with the camera when the character is moving any idea how to do that?
Example:
any idea how to do that pls???
unfortunately that didn’t help
Check to see if your Camera is still set to Track while testing in Studio. If it has reset back to Follow then you’ll probably have to use a script to update it.
https://developer.roblox.com/en-us/api-reference/property/Humanoid/AutoRotate
This is probably what you want, the AutoRotate
property of the Humanoid
object controls whether you want the Character to move relative to where you want to currently move (Which the camera also somewhat plays a role in this as well):
The API forgot to reference the other RotationType, but I think setting that property to false
will disable your Character’s ability to rotate in relation with the Camera (Aka it will only be facing towards the direction where you want it to first face)
local Character = CharacterModelHere --What your Character is
local Humanoid = Character:WaitForChild("Humanoid")
Humanoid.AutoRotate = false
You’ll have to adjust the HumanoidRootPart’s CFrame
if you want to rotate it in a specific direction
thank you so much for helping!, but I’m sorry i think my question isn’t clear, when i disable the auto rotate the character will still move with the camera’s facing direction let me show you what i mean,
i don’t want the character to rotate or move with the camera’s facing direction just like this video
So just to clarify, you only want the Character to move in a specific direction without the Camera interfering with it’s rotation & position, correct? You just only want it to move where it’s currently looking at
Yep that’s exactly what i want
You may have to disable the Character Movement by itself, as the only way to really move with the Character is via using the WASD
keys
You’ll have to set up your own movement functions to check when you want your Character to move at a specific position, so we’ll need to use UserInputService
for this occassion
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local HRP = Character:WaitForChild("HumanoidRootPart")
local RunService = game:GetService("RunService")
local UIS = game:GetService("UserInputService")
local Controls = require(Player.PlayerScripts.PlayerModule):GetControls()
Controls:Disable()
local MoveKeys = {Enum.KeyCode.W, Enum.KeyCode.A, Enum.KeyCode.S, Enum.KeyCode.D}
local function CheckMoving()
for _, MoveKey in pairs(MoveKeys) do
if UIS:IsKeyDown(MoveKey) then
Humanoid:Move(HRP.CFrame.LookVector)
end
end
end
RunService.RenderStepped:Connect(CheckMoving)
I’m uncertain if this will work or not, but as long as your Custom Character has a HumanoidRootPart
facing in the direction it’s currently looking it should be fine
How are you moving the player?
It seems that it’s in relation to the camera’s viewpoint, not the player’s viewpoint.
that actually worked thank you so much!!