BodyAngularVelocity not working

So this is a script that controls a bodyangularvelocity using remote events. I tried many things but the bodyangularvelocity doesnt do anything. I am getting the following errors:

 X cannot be assigned to
 Y cannot be assigned to

This is the code.

wait (11) -- temporary fix
local rep = game.ReplicatedStorage
local playercheck = script.Parent.Owner.Value								 -- this is obtained through occupant of the seat
local dir = script.Parent.Parent.Steer.BodyAngularVelocity.AngularVelocity  
local loopexit1 = false
local loopexit2 = false
print (playercheck)



rep.SteerLeft.OnServerEvent:Connect(function(player)						 -- activated when player holds A
	
	if player.Name == playercheck then
		
		dir.Y = 22
		
	end
end)

rep.SteerLeftStop.OnServerEvent:Connect(function(player)					 --   Activated when a player releases A
	
	if player.Name == playercheck  then
		
		dir = Vector3.new(0,22,0)
		wait (0.1)	
		
	end
	
	
	
		
end)

Quick note: The functions execute, the only problem is that I’m following the wiki and yet I’m still getting errors

Nevermind, I solved the issue by using WaitForChild instead.