Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Tween Service Moving Multiple Parts?

I have made this script but every time I start the game, the objects are clumping together, they make a single part.

-- Services
local TweenService = game:GetService("TweenService")
local ReplicatedStorage = game:GetService('ReplicatedStorage')

local Parts = game.Workspace.Parts
local MovePart = Parts.Move
local partBabys = Parts:GetChildren()
local point = ReplicatedStorage:WaitForChild("Point").Value

for i,v in ipairs(partBabys) do
	if v:IsA('Model') then
		local MoveProperties = {
			Position = Vector3.new(point, v.PrimaryPart.Position.X, v.PrimaryPart.Position.Y, v.PrimaryPart.Position.Z)
		}

		local MoveInfo = TweenInfo.new(17, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, -1, false, 0)

		local MoveTween = TweenService:Create(v.PrimaryPart, MoveInfo, MoveProperties)

		MoveTween:Play()
	end
	if v:IsA('Part') then
		local MoveProperties = {
			Position = Vector3.new(point, v.Position.Y, v.Position.Z)
		}

		local MoveInfo = TweenInfo.new(17, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, -1, false, 0)

		local MoveTween = TweenService:Create(v, MoveInfo, MoveProperties)

		MoveTween:Play()
	end
end

1 answer

Instead of making position where to go change the position of part so it will move off itsself

This discussion is preserved as it was. New answers, comments, and votes are closed.