1.I have 2 models with the same name and I am trying to get the VehicleSeat via LocalScript, but the problem is that the steering only works in one chassis.

2.The reason why I'm using a LocalScript is because the steering has this delay when your ping is more than 100ms-300ms if you use a ServerScript.

Local Script inside of StarterCharacterScripts:

--car and seat variables
local seat = game.Workspace.Cars:WaitForChild("Chassis"):WaitForChild("VehicleSeat")
local car = seat.Parent
--constraint variables
local LS = car.FL.SpringMount.Steer
local RS = car.FR.SpringMount.Steer
--VehicleSeat function
local function onChanged(property)
	--steering
	if seat.Steer == -1 then
		LS.AngularSpeed = 1
		RS.AngularSpeed = 0.8
		LS.TargetAngle = -30
		RS.TargetAngle = -25
	end
	if seat.Steer == 1 then
		LS.AngularSpeed = 0.8
		RS.AngularSpeed = 1
		LS.TargetAngle = 25
		RS.TargetAngle = 30
	end
	if seat.Steer == 0 then
		LS.AngularSpeed = 5
		RS.AngularSpeed = 5
		LS.TargetAngle = 0
		RS.TargetAngle = 0
	end
end
seat.Changed:Connect(onChanged)

1 comment

1

seat.Occupant is a reference to the Humanoid of the character sitting in the seat. Is this what you're looking for?