I’m trying to make script that activates module script function but, it dont make sense, my module script is creating 2 parts instead of just one
The script
local Model = CreateCloudModule.CreateStand(game.Workspace:WaitForChild("CloudModel"):WaitForChild("CloudMunicipe"), 1)
game.Debris:AddItem(Model,3)
Module script
local module = {}
local TweenService = game:GetService("TweenService")
module.CreateStand = function(StartPosition, NumberOfPoints)
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
local tweenInfo = TweenInfo.new(2.5)
local tween = TweenService:Create(Part, tweenInfo, goal)
tween:Play()
end
return Model
end
return module
But now it just creates a part that spawns on top of the main (Point) part, Part where the created part of the script module has to move up to, and it works but the OffSet is not having effect