How to make a jester tower? | Gnomecode Tower Defense Addons #6 | Part 3/6

Поділитися
Вставка
  • Опубліковано 18 січ 2025

КОМЕНТАРІ • 10

  • @irgegh
    @irgegh 3 місяці тому +1

    It's unrealistically cool. The gnome system is alive. I'm waiting for a new video =)

  • @josediahgaming6685
    @josediahgaming6685 3 місяці тому +1

    What about levels and ranks for the levels like you get the commander rank at level 25 and it will be above the name

  • @StudiosCode
    @StudiosCode  3 місяці тому +1

    If you are watching this, and didnt watch part 1 and 2, go watch it!!
    hitbox script for lazy ones:
    canhit = true
    local mob1
    tower = _G.Tower
    if tower.Config:FindFirstChild("Type").Value == "Throw" then
    script.Parent.Touched:Connect(function(hit)
    if canhit == true then
    local mob = hit.Parent
    if hit.Parent.Parent == workspace.Mobs then
    mob1 = mob
    mob:FindFirstChild("Humanoid").WalkSpeed = 2
    if not mob:FindFirstChild("Humanoid") then
    return end
    end
    end
    end)

    script.Parent.TouchEnded:Connect(function(hit)
    local mob = hit.Parent
    if hit.Parent.Parent == workspace.Mobs then
    canhit = false
    mob:FindFirstChild("Humanoid").WalkSpeed = mob.NormalSpd.Value
    if not mob:FindFirstChild("Humanoid") then
    return end
    end
    end)

    if canhit == true then
    while wait(tower.Config.HitCooldown.Value) do
    mob1.Humanoid.Health -= tower.Config.HitDamage.Value
    if not mob1:FindFirstChild("Humanoid") then
    return end
    end
    end
    end
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    remember thats touched and touchended are completely optional!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    so if you dont want that part of lower walkspeed, copy this:
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    canhit = true
    local mob1
    tower = _G.Tower
    if tower.Config:FindFirstChild("Type").Value == "Throw" then
    script.Parent.Touched:Connect(function(hit)
    if canhit == true then
    local mob = hit.Parent
    if hit.Parent.Parent == workspace.Mobs then
    mob1 = mob
    if not mob:FindFirstChild("Humanoid") then
    return end
    end
    end
    end)

    script.Parent.TouchEnded:Connect(function(hit)
    local mob = hit.Parent
    if hit.Parent.Parent == workspace.Mobs then
    canhit = false
    if not mob:FindFirstChild("Humanoid") then
    return end
    end
    end)

    if canhit == true then
    while wait(tower.Config.HitCooldown.Value) do
    mob1.Humanoid.Health -= tower.Config.HitDamage.Value
    if not mob1:FindFirstChild("Humanoid") then
    return end
    end
    end
    end

  • @MiniatureGamingX
    @MiniatureGamingX 3 місяці тому +2

    the posion in tds dosent make the zombies slower

    • @StudiosCode
      @StudiosCode  3 місяці тому

      yeah, ik i just made it like that to be "more creative"

    • @MiniatureGamingX
      @MiniatureGamingX 3 місяці тому +2

      @@StudiosCodeno

  • @gamer-j7l9v
    @gamer-j7l9v 3 місяці тому +1

    hey, how did you fix the mob and tower collision?

    • @StudiosCode
      @StudiosCode  3 місяці тому

      I didnt fix yet, but ill try

    • @gamer-j7l9v
      @gamer-j7l9v 3 місяці тому +1

      @@StudiosCode if you do, can you do a tutorial?

    • @StudiosCode
      @StudiosCode  3 місяці тому

      @@gamer-j7l9vfor sure!