You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I want to be able to offset the position of the head
What is the issue? Include screenshots / videos if possible!
If you go to a player’s neck and try to offset C0 and C1, it doesn’t work. Even if you do it using propertites, while offsetting npc heads works.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
no similar issues, stumped
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
-- This is an example Lua code block
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
You Can Try Using CFrame.new or CFrame.Angles.
An Example Using A LocalScript:
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Root = Character:WaitForChild("HumanoidRootPart")
local Neck = Character:FindFirstChild("Neck", true)
local YOffset = Neck.C0.Y
local def = Neck.C0
local pi = math.pi
local randomRotationX = (math.random() - 0.5) * 0.5 * pi -- Generates random x-axis (You can delete these 3 lines if you don't want it to be random)
local randomRotationY = (math.random() - 0.5) * 0.5 * pi -- Generates random y-axis
local randomRotationZ = (math.random() - 0.5) * 0.5 * pi -- Generates random z-axis
if Neck then
if Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
Neck.C0 = CFrame.new(0, YOffset, 0) * CFrame.Angles(randomRotationX, randomRotationY, randomRotationZ)
elseif Character.Humanoid.RigType == Enum.HumanoidRigType.R6 then
Neck.C0 = CFrame.new(0, YOffset, 0) * CFrame.Angles(3 * pi/2 + randomRotationX, randomRotationY, pi + randomRotationZ)
end
end