Tween refuses to play

As the title says, the tween refuses to play. I know the code runs because it creates the wall.

        AnimationTrack:GetMarkerReachedSignal("barrier/wall summon"):Once(function()
			Wall.Name = "Wall"
			Wall.Size = WALL_SIZE
			
			Wall.Anchored = true

			Wall.Parent = workspace.Cache
			
			Character.PrimaryPart.CFrame *= CFrame.new(0, -WALL_SIZE, -WALL_DISTANCE)
			
			local Tween = TweenService:Create(Wall, TweenInfo.new(.6, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {CFrame = (Character.PrimaryPart.CFrame * CFrame.new(0, 0, -WALL_DISTANCE))})
			Tween:Play() Tween:Destroy()
			Tween.Completed:Wait()
		end)
2 Likes

You are destroying it before it finishes, move Tween:Destroy() after Tween.Completed:Wait()

2 Likes

that’s not how it works, other tweens that are deleted exactly like that still work.

These work:

AnimationTrack:GetMarkerReachedSignal("arm red glow"):Once(function()
			local ArmColorTween = TweenService:Create(Character["Left Arm"], TweenInfo.new(ARM_GLOW_TIME, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {Color = Color3.fromRGB(149, 30, 21)})
			ArmColorTween:Play() ArmColorTween:Destroy()
			
			local ParticleRateTween = TweenService:Create(Character["Left Arm"].ParticleEmitter, TweenInfo.new(ARM_GLOW_TIME, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {Rate = 100})
			ParticleRateTween:Play() ParticleRateTween:Destroy()
			
			task.wait(ARM_GLOW_TIME)
		end)
1 Like

It was due to a connection to RunService.Stepped that moved the part in front of the player which happen to be the position i want to tween it to.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.