How to make a Basic Sword | ROBLOX Studio

Поделиться
HTML-код
  • Опубликовано: 20 окт 2024

Комментарии • 5

  • @aspectratio_yt
    @aspectratio_yt  3 месяца назад +1

    Server Side:
    local hitboxEvent = game.ReplicatedStorage.Remotes.Hitbox
    local hitboxDestroyTime = 0.2
    local Ifhit = false
    hitboxEvent.OnServerEvent:Connect(function(player)
    local hitbox = Instance.new("Part")
    hitbox.Size = Vector3.new(8,8,8)
    hitbox.CFrame = player.Character.HumanoidRootPart.CFrame * CFrame.new(0,0,-3)
    hitbox.Transparency = 1
    hitbox.CanCollide = false
    hitbox.Anchored = true
    hitbox.Parent = workspace
    --Damaged touched
    hitbox.Touched:Connect(function(hit)
    local humanoid = hit.Parent:FindFirstChild("Humanoid")
    if humanoid and humanoid.Health > 0 and hit.Parent.Name ~= player.Name and Ifhit == false then
    Ifhit = true
    humanoid:TakeDamage(10)

    wait(hitboxDestroyTime + 0.1)
    Ifhit = false
    end
    end)
    game.Debris:AddItem(hitbox, hitboxDestroyTime)
    end)
    Thanks for watching

  • @Wak-ts2ie
    @Wak-ts2ie 3 месяца назад +1

    In Sha Allah u will get famous

  • @ZMEGA_OFFICAL
    @ZMEGA_OFFICAL 3 месяца назад

    i love ur vids