#Can't make multiple for attack thingies,

7 messages · Page 1 of 1 (latest)

shut surge
#
function CreateSlash(Mob, Damage)
    
    local distance = 500
    
    local newSlash = script.Slash:Clone()
    newSlash.CFrame = Mob.PrimaryPart.CFrame
    newSlash.Parent = Mob.AttackDebris
    
    local tween = game:GetService("TweenService"):Create(newSlash, TweenInfo.new(10, Enum.EasingStyle.Sine), {CFrame = Mob.PrimaryPart.CFrame + (Mob.PrimaryPart.CFrame.LookVector * distance)})

    for i, slash in Mob.AttackDebris:GetChildren() do
        if slash.Name == "Slash" then
            tween:Play()
            slash.Touched:Connect(function(hit)
                if hit.Parent:FindFirstChild("HumanoidRootPart") and hit.Parent ~= Mob then
                    hit.Parent.Humanoid:TakeDamage(Damage)
                    slash:Destroy()
                end
            end)
        end
    end
end

function Dummy.Blue_Spin(Mob, Target, Damage)
    local Anim = script.Spin
    local AnimT = Mob.Humanoid:LoadAnimation(Anim)
    CreateSlash(Mob, Damage)
    AnimT:Play()
end
#

Basically i wanna create more than 1 slash thingb

#

i mean

#

How to use velocity for it

#

cause tween make survr lag

nimble cedar
#

can u send video