-
What do you want to achieve?
So It Detects If There Will Be Collision Between Parts Before They Even Will Be Cloned And If It Will Than It Will Put Other Part That Will Not Collide And If Not Able To Just Do Nothing -
What is the issue?
I Don’t Know How To Do It
for i = 1,100 do
for i,v in pairs(game.Workspace.Maze:GetChildren()) do
local attachment2 = v:FindFirstChild("Attachment")
for i,v in pairs(v:GetChildren()) do
end
if attachment2 ~= nil then
newpart = game.ReplicatedStorage.MazePart:Clone()
local attachment2 = v.Attachment
newpart.BrickColor = BrickColor.random()
newpart.Parent = game.Workspace.Maze
local attachment1 = newpart.ConnectionAttachment
newpart.CFrame = attachment2.WorldCFrame * attachment1.CFrame:Inverse()
attachment2:Destroy()
wait(0.125)
end
end
end
this is the code i am gonna make it so it gets diffrent fragments but 1st i need to make it so it prevents collision
3. What solutions have you tried so far?
I Have Tried Asking A Coder Friend And Looked Up On Google With No Success
btw this is what it basicly does