Hello, I want to make a part rotate but when the T value is bigger than 90. Part rotation Y value gets broken Example:
Y: 94
After 0.001 seconds
Y: -94
local HandRot = Vector3.new(90, 0, 0)
local LowARot = Vector3.new(90, 0, 0)
local UpARot = Vector3.new(90, 0, 0)
local UpperRotZ = 0
local UpperRotX = 0
function HandRot(CurTargetR, CurTargetPos)
local Vmodel = script.Parent
local Hand = Vmodel.RightHand
Hand.Rotation = CurTargetR
end
while wait() do
local Vmodel = script.Parent
local Hand = Vmodel.RightHand
local LowerArm = Vmodel.RightLowerArm
local UpperArm = Vmodel.RightUpperArm
local TPoint = Vmodel["Target Point"]
local BoneConnection = Vmodel.BoneConnection
HandRot(TPoint.Rotation, TPoint.Position)
local T = (((BoneConnection.Position - TPoint.Position).Magnitude)*90)
print(T)
UpperArm.Rotation = Vector3.new(UpperArm.Rotation.X, T, UpperArm.Rotation.Z)
end

