#how

1 messages · Page 1 of 1 (latest)

verbal phoenix
#

im following a tutorial and how do i make it play 4 sounds on each hit?

#
game.ReplicatedStorage.MainEvent.OnServerEvent:Connect(function(plr)
    spawn(function()
        plr.Character.Humanoid.WalkSpeed = 4
        task.wait(0.35)
        plr.Character.Humanoid.WalkSpeed = 16
    end)
    
    local hitbox = Instance.new("Part")
    
    hitbox.Parent = workspace
    hitbox.CanCollide = false
    hitbox.Anchored = true
    hitbox.Size = Vector3.new(6, 6, 5)
    hitbox.BrickColor = BrickColor.new("Really red")
    hitbox.Transparency = 0.5
    hitbox.CFrame = plr.Character.HumanoidRootPart.CFrame * CFrame.new(0,0, -3)
    game.Debris:AddItem(hitbox,.2)
    local hitboxcooldown = false
    hitbox.Touched:Connect(function(hit)
        if hit.Parent.Name ~= plr.Name and hit.Parent:FindFirstChild("Humanoid") then
            if hitboxcooldown == true then return end
            hitboxcooldown = true
            hit.Parent:FindFirstChild("Humanoid"):TakeDamage(5)
            local sound = script.Punch1:Clone()
            sound.Parent = hit.Parent.HumanoidRootPart
            sound:Play()
            game.Debris:AddItem(sound, 1)
            task.wait(2)
            hitboxcooldown = false
        end
    end)
    
end)```
#

Join Discord To Get VFX:
https://discord.com/invite/P6BCbmTmQ2

JOIN OUR ACADEMY HERE: 🌟⬇️
https://www.whop.com/vuukstudios-academy

OUR STORE (60% OFF): 📦
https://www.vuukstudios.com

This free combat system package is made for new and beginner developers embarking on their journey in Roblox. It is supposed to teach them how to make a...

▶ Play video