----Can someone make this so it works on torso and not the arm?
------------------------------------------------------------------
actionJ = script.cT
actionX = script.cX
actionY = script.cY
actionZ = script.cZ
frame = script.Parent
plusX = frame.bpX
minusX = frame.bmX
plusY = frame.bpY
minusY = frame.bmY
plusZ = frame.bpZ
minusZ = frame.bmZ
target = frame.Title
gui = frame.Parent
alt = gui.Frame2.PoseScript
poseX = alt.pX
poseY = alt.pY
poseZ = alt.pZ
player = gui.Parent.Parent
function setPose()
local a = player.Character.Torso:findFirstChild(actionJ.Value)
if (a~=nil) then
a.C1 = CFrame.new(poseX.Value,poseY.Value,poseZ.Value) * CFrame.Angles(actionX.Value,actionY.Value,actionZ.Value)
end
end
function addX ()
actionX.Value = actionX.Value + math.pi/16
setPose()
frame.dX.Text = actionX.Value
end
function subX ()
actionX.Value = actionX.Value - math.pi/16
setPose()
frame.dX.Text = actionX.Value
end
function addY ()
actionY.Value = actionY.Value + math.pi/16
setPose()
frame.dY.Text = actionY.Value
end
function subY ()
actionY.Value = actionY.Value - math.pi/16
setPose()
frame.dY.Text = actionY.Value
end
function addZ ()
actionZ.Value = actionZ.Value + math.pi/16
setPose()
frame.dZ.Text = actionZ.Value
end
function subZ ()
actionZ.Value = actionZ.Value - math.pi/16
setPose()
frame.dZ.Text = actionZ.Value
end
function changeT ()
local a = actionJ.Value
if (a=="Torso") then
actionJ.Value = "Left"
target.Text = "Left"
elseif (a=="Left") then
actionJ.Value = "Right"
target.Text = "Right"
elseif (a=="Right") then
actionJ.Value = "Left"
target.Text = "Left"
elseif (a=="Left") then
actionJ.Value = "Neck"
target.Text = "Head"
elseif (a=="Neck") then
actionJ.Value = "Right"
target.Text = "Right"
end
end
plusX.MouseButton1Down:connect(addX)
minusX.MouseButton1Down:connect(subX)
plusY.MouseButton1Down:connect(addY)
minusY.MouseButton1Down:connect(subY)
plusZ.MouseButton1Down:connect(addZ)
minusZ.MouseButton1Down:connect(subZ)
target.MouseButton1Down:connect(changeT)
|