#Help

23 messages · Page 1 of 1 (latest)

fresh igloo
#

I'm trying to make a program that makes 5 parts merge together using tween and then create a bigger part. For that I decided that the parts should be destroyed and the new is going to be an instance. The code gives no errors but doesn't work as intended (I have the tween code pasted on every single part).

raven venture
#

so you have 5 part that should merg together and make 1 big part?

fresh igloo
#

yuh

indigo mantleBOT
#

studio** You are now Level 5! **studio

fresh igloo
raven venture
#

ok

#

i will experiment with the code

#

but now i have to go

#

coming back in 15-20 min

fresh igloo
#

alr

smoky tangle
fresh igloo
smoky tangle
#

For loop

raven venture
#

local partFolder = script.Parent
local PartsMergingPoint = game.Workspace.PartsMergingPoint

for _, part in pairs(partFolder:GetChildren()) do
if part:IsA("Part") then

    part.CFrame = PartsMergingPoint.CFrame
end
part:Destroy()

end

local part = Instance.new("Part")
part.Parent = game.Workspace
part.Size = Vector3.new(10, 10, 10)
part.Position = PartsMergingPoint.Position + Vector3.new(0, 5, 0)

#

sorry i was late

#

this code will make the parts merge and a big big one will appear in the middle

#

partsMergingPoint is the place where the parts will colide

indigo mantleBOT
#

studio** You are now Level 2! **studio

raven venture
#

i think there is a better way to do it

#

but im a biggener

eager cradle
#

also why are you checking if it's a part if it's already in the partFolder

raven venture