Here is what I have:
That is a wheel connected to the chassis with a spring.
Here is what happens:
The spring inverts itself, essentially going past the first part and staying there.
This is an edge case thing that I want to fix.
All four wheels and their suspensions have the same issue.
Children Explorer:
It’s the same in the front
I have tried to fix it with this:
for _, wel in ipairs(chas.Wheels:GetChildren()) do --stupid suspension problems
if wel:IsA("Part") then
local fram = chas.Frame
local tPos = fram.CFrame:toObjectSpace(wel.CFrame)
if tPos.Y > 0.5 then
print(wel.Name.." is over the frame. Fixing that!")
local nObjCf = CFrame.new(Vector3.new(tPos.X, -1.4, tPos.Z))
local nPos = fram.CFrame:toWorldSpace(nObjCf) --converts the cframe to a useable world position
wel.Position = nPos.Position
end
end
end
By getting the localposition of the object then applying a new world position that is below the local position.
However, it does move the wheel downwards but the spring gets angry (to say the least) and sends the car to the void.
Attempted Modifications:
- Raise the car up about 10 studs with a debounce
- Simple Debounce
Both Failed.
All I need is a simple way to stop the springs from inverting, or return them to their original state.