local Phys = game:GetService("PhysicsService")
function SetPartCollision(Part)
if Part:IsA("BasePart") then
Phys:SetPartCollisionGroup(Part,"ObjectNoCollide")
end
end
function Givemodelnoplrcollision(modl)
modl.DescendantAdded:Connect(SetPartCollision)
for i,v in pairs(modl:GetDescendants()) do
SetPartCollision(v)
end
end
game.ReplicatedStorage.DealershipEvents:WaitForChild("SpawnCar").OnServerEvent:Connect(function(player,CarName)
local NewCar = game.ServerStorage.ShopCars:FindFirstChild(CarName)
local NewestCar = NewCar:Clone()
NewestCar.Owner.Value = player.Name
NewestCar.DriveSeat.ProximityPrompt.ActionText = player.Name.."'s Car"
local Paint = player.OwnedColors:FindFirstChild(NewestCar.CarName.Value)
local SecPaint = player.OwnedSecColors:FindFirstChild(NewestCar.CarName.Value)
local RimColor = player.OwnedRimColor:FindFirstChild(NewestCar.CarName.Value)
local Reflectance = player.OwnedReflectance:FindFirstChild(NewestCar.CarName.Value)
local player = game.Players[player]
Givemodelnoplrcollision(NewestCar)