What solutions have you tried so far? Did you look for solutions on the Developer Hub?
everyone tutorial I’ve seen so far uses r15 and it works for that but I don’t know how to translate it over to r6
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!
local cam = workspace.CurrentCamera
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local torso = char:WaitForChild("Torso")
local rightShoulder = torso:FindFirstChild("Right Shoulder", true)
local y = rightShoulder.C1.Y
while wait(1) do
if rightShoulder then
local camDirection = torso.CFrame:ToObjectSpace(cam.CFrame).LookVector
rightShoulder.C1 = CFrame.new(-0.5, 0.5, 0)
rightShoulder.C1 = CFrame.fromOrientation(0, 90, -camDirection.Y)
end
end
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.
local cam = workspace.CurrentCamera
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local torso = char:WaitForChild("HumanoidRootPart")
local rightShoulder = torso:FindFirstChild("Right Shoulder", true)
local C0Off = rightShoulder.C0
while wait(1) do
if rightShoulder then
local camcf = CFrame.new(torso.Position,cam.CFrame)
rightShoulder.C0 = C0Off*camcf
end
end
local cam = workspace.CurrentCamera
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local torso = char:WaitForChild("Torso")
local rightShoulder = torso:FindFirstChild("Right Shoulder", true)
local C0Off = rightShoulder.C0
while wait(1) do
if rightShoulder then
local camcf = CFrame.new(torso.Position,cam.CFrame)
rightShoulder.C0 = C0Off*camcf
end
end
local cam = workspace.CurrentCamera
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local torso = char:WaitForChild("Torso")
local rightShoulder = torso:FindFirstChild("Right Shoulder", true)
local C0Off = rightShoulder.C0
while wait(1) do
if rightShoulder then
local camcf = CFrame.new(torso.Position,cam.CFrame.Position) -- forgot to make it a vector3 mb
rightShoulder.C0 = C0Off*camcf
end
end
When using C1, you use :Inverse(), which is the Inverse of a CFrame, when Applying Rotations, you use Radians Instead of Degree’s, which 90 degrees should be equivilent to math.pi/2 or math.pi*.5
C0 and C1 are applied in Object Space, meaning their Positions are Relative to Something. C0 is Relative to Part0, C1 is Relative to Part1.
If you have a Position of 100,100,100, with a Part that is 50,50,50, The Position Transformed to Object Space would be 50, 50, 50 as the difference of 100 - 50 is 50, but in world space its 100, 100, 100
If you Apply World Space onto a Property that uses Object Space, it will apply it based on Object Space, which you use :ToObjectSpace() to Transform the CFrame, or you can use b:Inverse() * a with is the same as b - a
so am I applying this to the C1 or should I switch to C0
your explanation was perfect but I’m confused on how to apply it to the code
edit: if u can tell me how to do that it would be good, but if not i should be able to figure it out on my own with how u explained it