--[[ REQUIRED FOR RTRA RP SESSIONS!!! not having this script will cause your car to phase through the ground :^)
Drop in the main model where caradmin and anticollide is
obviously don't go fiddling with any of the script
--]]


script.Parent:WaitForChild("Wheels")
fronts = script.Parent.Wheels.FL.Size.Y
rears = script.Parent.Wheels.RR.Size.Y

function TireSetups(wheelname, wheel, which)
local tire = Instance.new("Part")
tire.Parent = script.Parent.Wheels:FindFirstChild(wheelname).Parts
tire.Name = "Rep"
tire.Shape = 0
tire.Anchored = true
tire.Size = wheel.Size - Vector3.new(0.4, 0.4, 0.4)
tire.CustomPhysicalProperties = PhysicalProperties.new(0.01, 0.2, 0.5, 100, 1)
tire.CFrame = CFrame.new(wheel.Position)
tire.CanCollide = true
tire.Transparency = 1

end

TireSetups(script.Parent.Wheels.FL.Name, script.Parent.Wheels.FL, fronts)
TireSetups(script.Parent.Wheels.FR.Name, script.Parent.Wheels.FR, fronts)
TireSetups(script.Parent.Wheels.RL.Name, script.Parent.Wheels.RL, rears)
TireSetups(script.Parent.Wheels.RR.Name, script.Parent.Wheels.RR, rears)
