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).
#Help
23 messages · Page 1 of 1 (latest)
so you have 5 part that should merg together and make 1 big part?
yuh
** You are now Level 5! **
I wanted to explore an efficient way of doing this
ok
i will experiment with the code
but now i have to go
coming back in 15-20 min
alr
Positions is not a valid member of table ‘gameparts’
How do I get the position of all parts of inside the table without having to write repetitive lines of code?
For loop
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
** You are now Level 2! **
don't you want to lerp or tween it to the mergingpoint
also why are you checking if it's a part if it's already in the partFolder
i tried to use tween but failed