Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i reset the orientations of a C0?

Asked by
FBS_8 25
3 years ago
local c = game.Workspace.CurrentCamera
local p1 = game:GetService("Players")
local p2 = p1.LocalPlayer
local m = p2:GetMouse()
local char

while wait() do
        char = p2.Character or p2.CharacterAdded:wait()
    if script.Parent:WaitForChild("Fists") then
        char.Torso["Right Shoulder"].C0 = CFrame.new(1,0.5,0) * CFrame.Angles(-math.asin((m.Origin.p - m.Hit.p).unit.y),1.55,0)
        char.Torso["Left Shoulder"].C0 = CFrame.new(-1,0.5,0) * CFrame.Angles(-math.asin((m.Origin.p - m.Hit.p).unit.y),-1.55,0)
    else
        char.Torso["Right Shoulder"].C0 = --Original Orientation
        char.Torso["Left Shoulder"].C0 = --Original Orientation
    end
    char.Torso["Neck"].C0 = CFrame.new(0,1,0) * CFrame.Angles(-math.asin((m.Origin.p - m.Hit.p).unit.y) + 1.55,3.15,0)
end

how would i reset the C0 when the tool isnt in the char anymore?

Answer this question