So I decided to make a script to fix the rotation of ACrabs that get stuck in weird angles. Should be fairly simple, and yet it doesn't work. The "rotation fixed" message appears, but nothing else happens. What am I doing wrong? Thanks in advance.
Code:
function Create(self)
-- The variables:
self.SleepyHead = 0
end
function Update(self)
if self:IsPlayerControlled() and UInputMan:KeyPressed(18) then
self.AbsRotateTo = 0 ;
print ("Tank rotation fixed!")
end
end