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:
The Highlight and trail is still there :
Highlight properties:
Trail properties:
Am I just making a stupid mistake, a replication error? idk
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