Parts getting deleted once game starts

Howdy! Got a very weird issue I never had in studio, anyone can help?

As you can see in the image below, we have 5 parts under the folder “CarSpots”.
image
Now let’s start the game and see.
image
All of a sudden, we can see the parts just got deleted. I have no idea why as there is only one script that I’m currently working on that accesses these parts.

Still working on the script and debugging, don’t judge it.

script.Parent.MouseButton1Up:Connect(function(player)
	local Car = game.ServerStorage.Car_Mustang
	local CloneCar = Car:Clone()
	local Position1 = game.Workspace["Civilian Spawn"].CarSpots.S1.Position
	local Position2 = game.Workspace["Civilian Spawn"].CarSpots.S2.Position
	local Position3 = game.Workspace["Civilian Spawn"].CarSpots.S3.Position
	local Position4 = game.Workspace["Civilian Spawn"].CarSpots.S4.Position
	local Position5 = game.Workspace["Civilian Spawn"].CarSpots.S5.Position
	local PossibleSpawns = {Position1, Position2, Position3, Position4, Position5}
	
	--CloneCar.Name = player.Name.."'s_Car"
	CloneCar.PrimaryPart.Position =  PossibleSpawns[math.random(1, #PossibleSpawns)]
	CloneCar.Parent = game.Workspace
end)

Anyone can help? Thanks!

1 Like

I know the problem. The parts are not anchored and sometimes for some reason this causes them to delete. Try welding, or turning collisions on. Or, anchor them if it doesn’t affect the game. If I’m wrong, oops! But try anyway lol.

did u anchored it? but it car system so i think u need to weld it

Somehow it was as simple as this, no idea how this even happened as I have an auto anchor plugin but whatever. Thanks bro!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.