i may have not been that clear in the caption what i meant is
i have an another script that is assigning the object Cframe to an another object cframe every half a second. but all i want is that when the player presses R the object rotation adds 5 to the x axis,
i want it like this
while wait(0.0001) do -- ignore the little mistakes its just an example
object.CFrame = object2.CFrame
uis.inputbegan:connect(function(key)
if key.keycode == enum.keycode.R then
object.Orientation += vector3.new(0,0,5)-- keep in mind this will not effect the orientation because the cframe is interrupted by the lines up but i want it to add 5 while applying the other object's CFrame
end
end)
end
You could, but you are using the incorrect function to rotate an Object, its supposed to be CFrame.Angles (Alternatively CFrame.fromEulerAnglesXYZ), not CFrame.new
You are also using math.deg which converts radians into Degrees, use math.rad which converts degrees into radians.