Hello Developers!
I am currently creating my own chassis but I am having problems which include the car not moving at all when any inputs are pressed? I been messing around trying to fix this for hours now and I cannot find the solution? I’ve provided code as well as my directory structure. If you find any solutuons / issues please inform me.
-Thanks, 50Alpha
local Tune = require(script.Tune)
local Car = script.Parent
for i, v in pairs(Car:GetDescendants()) do
if v:IsA("Part") or v:IsA("UnionOperation") or v:IsA("MeshPart") or v:IsA("SpecialMesh") then
v.Anchored = true
end
end
for i, v in pairs(Car.Axises:GetChildren()) do
local Weld = Instance.new("Weld")
Weld.Parent = Car.Frame
Weld.Part0 = Car.Frame
Weld.Part1 = v
Weld.C0 = CFrame.new().toObjectSpace(Car.Frame.CFrame, v.CFrame)
local Wheel = Car.Wheels["Wheel".. string.sub(v.Name, 5, 6)]
local AttachmentAxle = Instance.new("Attachment")
local AttachmentWheel = Instance.new("Attachment")
AttachmentAxle.Parent = v
AttachmentWheel.Parent = Wheel
AttachmentAxle.Position = Vector3.new(0.5, 0, 0)
AttachmentWheel.Position = Vector3.new(-0.5, 0, 0)
local Cylinder = Instance.new("HingeConstraint")
Cylinder.Parent = v
Cylinder.Attachment0 = AttachmentWheel
Cylinder.Attachment1 = AttachmentAxle
end
for i, v in pairs(Car:GetDescendants()) do
if v:IsA("Part") or v:IsA("UnionOperation") or v:IsA("MeshPart") or v:IsA("SpecialMesh") then
v.Anchored = false
end
end