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)
You need to update number2 as the rotation changes. Change it to this:
UserInputService.InputBegan:Connect(function(Input, GameProcessedEvent) if Input.KeyCode == Enum.KeyCode.R then local number1 = part.Rotation.Z local number2 = number1 + 90 print(number1) part.Rotation = Vector3.new(90, 0, number2)
This way number2 will update every time depending on the part's rotation on that iteration, rather than remaining consistent to the part's starting rotation.