--Initialization--

xSSR.Anchored = true
xSSL.Anchored = true
zBRR.Anchored = true
zBRL.Anchored = true

weight.Rotation = alig.Rotation
engine.Rotation = alig.Rotation
fuel.Rotation = alig.Rotation
diff.Rotation = alig.Rotation
trans.Rotation = alig.Rotation
hitboxF.Rotation = alig.Rotation
hitboxR.Rotation = alig.Rotation
alig:remove()

xSSR.CFrame = xSSR.CFrame * CFrame.Angles(math.rad(0), math.rad(0), math.rad(CamberFront*-1))
xSSL.CFrame = xSSL.CFrame * CFrame.Angles(math.rad(0), math.rad(0), math.rad(CamberFront*1))

zBRR.CFrame = zBRR.CFrame * CFrame.Angles(math.rad(0), math.rad(0), math.rad(CamberRear*-1))
zBRL.CFrame = zBRL.CFrame * CFrame.Angles(math.rad(0), math.rad(0), math.rad(CamberRear*1))


if Drivetrain == "FWD" then
vRdifferential.Value = 0
elseif Drivetrain == "RWD" then
	vFdifferential.Value = 0 
end
script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(math.rad(-0.59), math.rad(0), math.rad(0))

local D = script.Assets.Screen:Clone()
D.Parent = script.Parent

local bodyweld = script.Assets.BodyWeld:Clone()
bodyweld.Parent = script.Parent.Parent
bodyweld.Disabled = false

for _,i in pairs(script.Parent.Parent.Parent:GetChildren()) do
 local new = script.Assets.Weld:Clone()
 if i.Name~="Wheels" and i.Name~="Body" then new.Parent = i end
 new.Disabled = false
end

for _,i in pairs(script.Parent.Parent.Parent.Wheels:GetChildren()) do
	local new = script.Assets.Weld:Clone()
	new.Parent = i
	new.Disabled = false
end