I’m following a video tutorial that allows the players head to always look at the camera. But for some reason my head is orientated weirdly when setting a new CFrame for it:
It doesn’t look like that in the video, nor does it when other people have tested it
How it’s meant to look:
The youtuber is using R15 so that might be it
Well obviously that a problem causing that.
Offsets in R6 and R15 built absolutelly differently.
Regardless you should never edit them and use .Transform property instead. Motor6D | Documentation - Roblox Creator Hub
But edit that locally of course.
Etc dont send camera rotation data of other players to players that are too far awey.
How exactly would I go about that? My current script says this and I’ve tried swapping around C0 with transform, but nothing has worked.
local camera = workspace.CurrentCamera
local character = game.Players.LocalPlayer.Character
local root = character:WaitForChild("HumanoidRootPart")
local neck: Motor6D = character:FindFirstChild("Neck", true)
local yOffsetNeck = neck.Transform.Y
game:GetService("RunService").RenderStepped:Connect(function()
if neck then
neck.C0 = CFrame.new(0, yOffsetNeck, 0)
end
end)
You dont need reading transform property.
You need writing it.
You just need to write pure normalized direction and that it.
IGNORE C0 and C1 entirely and dont touch them in any way.
Could you provide an example please?
game:GetService("RunService").PreSimulation:Connect(function():()
neck.Transform = CFrame.new(0, yOffsetNeck, 0)
end)
Would yOffsetNeck remain the same?
No idea how you implemented it inside your code.
I also actually have written it wrong.
You dont need changing position, just rotation in cframe.