Ok. I have a rotating part, but for some reason it can rotate only 1 time. Idk why.
local number1 = part.Rotation.Z
local number2 = number1 + 90
print(number1)
UserInputService.InputBegan:Connect(function(Input, GameProcessedEvent)
if Input.KeyCode == Enum.KeyCode.R then
part.Rotation = Vector3.new(90, 0, number2)

2 comments
idk why, but when I insert your script, the part turns not 90, but in a random direction. to all this, the game is very laggy
ok. i fixed this. i just added debounce. anyway i accept your answer.