Part Not Moving

For some reason the part isn’t moving even if there are no errors in the output. Is there any error in the script?
This is the script:


local TweenService = game:GetService("TweenService")

local Info = TweenInfo.new(
	10,
	Enum.EasingStyle.Sine,
	Enum.EasingDirection.InOut,
	5,
	true,
	1
)



local TweenGoals = {
	Position = script.Parent.Parent.Guide1.Position
}

while true do	
	wait()
	local Tween = TweenService:Create(script.Parent,Info,TweenGoals)
	Tween:Play()
	

end

Remove the while loop and play it normally, it probabaly is over-stacking.

1 Like

As @Mystxry12 said, remove the while loop.
You’re currently creating a new tween every frame, which cancels the previous one.

1 Like

that will be stuck at the delay time

well if you remove the delay time
you still might wont gonna notice if its actually moving cuz it spams the tween that the tween will have a short of time tweening the position

you dont need the last 4 params in the tween info it will be just cancel due to the spam of the loop

local TweenService = game:GetService("TweenService")

local Info = TweenInfo.new(
	10,
	Enum.EasingStyle.Sine,
)



local TweenGoals = {
	Position = script.Parent.Parent.Guide1.Position
}

while true do	
	wait()
	local Tween = TweenService:Create(script.Parent,Info,TweenGoals)
	Tween:Play()
end

but i could say its unifficient

you can use constraints instead

1 Like