the module script technically active need to create a part to move the part to its main point using the tween service, but the part is not going to the desired location, and yet instead of creating only one part the module creates 2 parts that are bug, one part at the beginning is on top then goes to the desired location but the other starts at the location I planned but goes below the desired location, please can you help me?
Module Script.
local Model = Instance.new("Model",game.Workspace.DebrisFolder)
for i = 0,NumberOfPoints do
local OffSet = Vector3.new(math.random(-45, 45),math.random(-45, 45),math.random(-45, 45))
if i == 1 or i == NumberOfPoints then
OffSet = Vector3.new(0,0,0)
end
local Part = game:GetService("ReplicatedStorage").FruitEvent.FruitModelClone.StormStormNoMi.Clouds.Cloud:Clone()
Part.Parent = Model
Part.Position = StartPosition.Position + (StartPosition).Position * i * (StartPosition).Position/NumberOfPoints + OffSet
task.wait(0.1)
local goal = {}
goal.Position = StartPosition.Position * i * StartPosition.Position
local tweenInfo = TweenInfo.new(2.5)
local tween = TweenService:Create(Part, tweenInfo, goal)
tween:Play()
end
return Model
Here the script that activate the module script
local Model = CreateCloudModule.CreateStand(game.Workspace:WaitForChild("CloudModel"):WaitForChild("CloudMunicipe"), 1)
game.Debris:AddItem(Model,3)
and here is the result
sorry for the goofy explaing