I have created trails and made it work in my combat script so that it emits during the animations.
As you can see I have problems disabling the trail as I don’t know when to place the remove/disable part of the trail.
I have included a snippet of my code if anyone can help me.
local ran = math.random(1,2)
if ran == 1 then
Animations['LeftPunch']:Play()
Sounds['Miss']:Play()
LHTrail.Enabled = true
LHTrail.Attachment0 = LeftHand.LeftBotCorner
LHTrail.Attachment1 = LeftHand.LeftTopCorner
LHTrail.Parent = LeftHand
LHTrail.Color = ColorSequence.new(LHColor)
t = true
Character.LeftHand.Touched:connect(function(ouch)
if not t then return end
local e = ouch.Parent:FindFirstChild("Humanoid")
if e and e ~= Character.Humanoid then
t = false
Remotes.HitEffect:FireServer(Hit, HitRing, ouch)
Sounds['Hit']:Play()
damage(ouch)
end
end)
end