My rotation for my tower defense game isn't working!

I want my rotation to work for my tower defense game
but every time I try to rotate my tower by pressing r nothing happens and there is nothing in the output. I have tried changing the code but I just can’t seem to figure it out.



(Go from bottom to top with the photos)

Try adding a print statement to the key detection code to see if it runs or not.

elseif input.KeyCode == Enum.KeyCode.R then
     print("Rotating tower")
     rotation += 90
end

If the print statement doesn’t run, debug the conditions that lead up to that code.

If the print statement runs, check that the PrimaryPart property of the tower model is set. Also ensure that the model is properly rigged to the primary part.

Thank you a lot but after a good 1 hour I eventually figured out the issue I added some code but thank you for trying to help!!!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.