Making blinkers that automatically close when turning

Hi, I’m trying to make blinkers that automatically close when turning, but i’m having problems, can anyone help me?
Thanks
btw here is the script:

   elseif k == 'z' then -- left
        if not Debounce then
            Debounce = true
            handler:FireServer('blinkers', 'Left', true)
			wait(1/3)
			
			Debounce = false
			if game.Players.LocalPlayer.Character:WaitForChild("Humanoid").SeatPart.Steer == -1 then
				handler:FireServer('blinkers', 'Left', false)
			end
		end

Any errors in console? You’ll probably need to provide more code for context.

there are no errors but the script is in a screen gui