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”.
Now let’s start the game and see.
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!