It says "parent is not a valid member of Model"
for _, object in pairs(game.ServerStorage:GetChildren()) do
local CarCopy = object:clone()
CarCopy.parent = game.Workspace
CarCopy:MakeJoints()
end
I want to make the CarCopy to go in to the Workspace from my ServerStorage but it is not doing it here is all the scripts in that one script
local RespawnCarsBlock = game.Workspace.RestartCars
function RespawnCars()
print("Cars is respawning!")
for _, object in pairs(game.Workspace:GetChildren()) do
print(object.name)
if object.name == "Motorcycle" then
print("this is a Motorcycle we need to destroy it!")
object:destroy()
end
end
for _, object in pairs(game.ServerStorage:GetChildren()) do
local CarCopy = object:clone()
CarCopy.parent = game.Workspace
CarCopy:MakeJoints()
end
end
RespawnCarsBlock.Touched:connect(RespawnCars())

4 comments
Thank you very much it worked Thank you RubenKan how can i +rep you
You could click the Accept Answer button on the bottom. V
i dont see it
it came up right after i rote "i dont see it"