Cylindrical Constraint Behaving weirdly in a car chassis!

While I’m not experienced alot with cars scripting, I tried to make a car chassis system for my game, along going with suphi tutorial about Cars with suspension: https://www.youtube.com/watch?v=FVOowr2DXbM

I’ve come across a Cylindrical Constraint bug, In the video he made the constraint go along the Y axel just by making the Wheel attachment Z axel to 90 (because he created the car along the X axel) and setting the InclinationAngle of the constraint to 90, in my case I’ve done the same thing except making the Wheel attachment X axel instead of Z because I created the car along the Z axel, and somehow its behaving differently from the video:

My wheel is moving along the X axel while it should be moving along the Y axel:

How its behaving:

How it should behave:

Note: since I have many cars that need to go through this system (roughly 29) I’m making a module script where it replicate to all cars:

local function CreateChassis(wheel:BasePart)
		wheel.CollisionGroup = "Wheel"
		
		local Attach = Instance.new("Attachment",wheel)
		Attach.WorldOrientation = Vector3.zero

		local CarAttach = Instance.new("Attachment",Body)
		CarAttach.Name = wheel.Name
		-- Setting the CarAttachment position so it fits the wheel with more up by half the size
		-- Tires are Pre-Aligned to all cars
		CarAttach.WorldPosition = wheel.Position + Vector3.new(0,wheel.Size.Y/2,0)
		CarAttach.WorldOrientation = Vector3.zero
		
		Attach.Orientation = Vector3.new(90,0,0) -- X axle

		local CylCos = Instance.new("CylindricalConstraint",wheel)
		CylCos.Attachment0 = CarAttach
		CylCos.Attachment1 = Attach
		
		CylCos.InclinationAngle = 90
	end

For more Information:

Constraint Details Before Hitting Play:

Constraint Details After Hitting Play:

If you have any idea why is it behaving like this, or any solution lmk!!
Also its 3 AM for me so there is a chance I wont be responding

Nevermind, i was accidently setting the Wheel attachment instead of the car attachment,; even though I re-checked it. guess this is what 3 AM does to a person lol!!

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