Tweening not working?

Ello fellow people!
I am having a slight problem with making some m1s. I am using highlights and trails but they don’t work…
Here is the script part, tell me if smth wrong btw:

--Animation
	local ChosenAnim = nil
	ChosenAnim = M1_Animations.Punch_2
	local ChosenBodyPart = Character[ChosenAnim:GetAttribute("BodyPart")]
	--Selection and Load
	local Track = Animator:LoadAnimation(ChosenAnim)
	Track:AdjustSpeed(1.6)
	print("Chat")
	--BodyPart VFX
	for i, v in pairs(M1_VFX.BodyPart:GetChildren()) do
		print(v)
		local ClonedVFX = v:Clone()
		ClonedVFX.Parent = ChosenBodyPart
		if v:IsA("Highlight") then
			local FT = v.FillTransparency
			local OT = v.OutlineTransparency
			v.FillTransparency = 1
			v.OutlineTransparency = 1
			v.Enabled = true
			local TweenEnter = TS:Create(v, M1_TweenInfos.Server.HighlightEnterInfo, {FillTransparency = FT, OutlineTransparency = OT})
			TweenEnter:Play()
			TweenEnter.Completed:Wait()
			print("Exitting21123123")
			--Animation Start** and Highlight Start
			local TweenExit = TS:Create(v, TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {FillTransparency = 1, OutlineTransparency = 1, FillColor = M1_Settings.Server.HighlightEndColor})
			TweenExit:Play()
			print("Exitting")
			Track:Play()
			TweenExit.Completed:Connect(function()
				v:Destroy()
			end)
		elseif v:IsA("Trail") then
			local Att = ChosenAnim:GetAttribute("BodyPart")
			local A0
			local A1
			if Att == "Right Arm" then
				A0 = ChosenBodyPart.RightGripAttachment
				A1 = ChosenBodyPart.RightShoulderAttachment
			elseif Att == "Left Arm" then
				A0 = ChosenBodyPart.LeftGripAttachment
				A1 = ChosenBodyPart.LeftShoulderAttachment
				print("Chat222")
			--[[elseif Att == "Right Leg" then
				A0 = ChosenBodyPart.LeftGripAttachment
				A1 = ChosenBodyPart.LeftShoulderAttachment]]
			end
			v.Attachment0 = A0
			v.Attachment1 = A1
			v.Enabled = true
			Track.Stopped:Connect(function()
				v:Destroy()
			end)
		end
	end

Here is the demonstration video:

External Media

Here is the picture of the explorer even though the anim ended:
image
The Highlight and trail is still there :skull: :
Highlight properties:
image
Trail properties:
image

Am I just making a stupid mistake, a replication error? idk :person_shrugging:
If you do got any ideas to fix this, please inform me! Don’t worry about the “ChosenAnim” as I still have to implement that, I just loaded the punch I got first done which uses the left arm.
Thanks for stopping by :slight_smile:

instead of Track.Completed, use Track.Ended and put Track.Stopped And Ended before u play the anim

1 Like

I don’t get it?
The .Completed is not a animtrack btw.
Ima try the .Stopped on anim though to see if that works!

oh wait ye complteded was for tween… do the stopped thing

1 Like
local ClonedVFX = v:Clone()
ClonedVFX.Parent = ChosenBodyPart

I don’t see where this is referenced again. What I assume is happening is that you want to use this instead of v for everything right?

1 Like

tweens will cancel each other , if you tried to tween the same property with a tween before the old tween ends the new tween will cancel the old tween

1 Like