How to add punch Button in studio lite tutorial

Поділитися
Вставка
  • Опубліковано 26 гру 2024

КОМЕНТАРІ • 46

  • @DaniDking
    @DaniDking Місяць тому +18

    local punchEvent = game.ReplicatedStorage:WaitForChild("PunchEvent")
    local damageAmount = 10
    local function onPunch(player)
    local character = player.Character
    if character then
    local humanoid = character:FindFirstChild("Humanoid")
    if humanoid then
    for _, target in pairs(workspace:GetDescendants()) do
    if target:IsA("Model") and target ~= character then
    local targetHumanoid = target:FindFirstChild("Humanoid")
    if targetHumanoid then
    targetHumanoid:TakeDamage(damageAmount)
    end
    end
    end
    end
    end
    end
    punchEvent.OnServerEvent:Connect(onPunch)

    • @PatriciaGoder
      @PatriciaGoder Місяць тому

      Are you telling the truth?

    • @katakuri122
      @katakuri122 25 днів тому

      That dont work to me:/

    • @franciscahelenamesquita409
      @franciscahelenamesquita409 23 дні тому

      -
      local Players = game:GetService("Players")
      local ReplicatedStorage = game:GetService("ReplicatedStorage")
      local Workspace = game:GetService("Workspace") --
      local punchEvent = ReplicatedStorage:WaitForChild("PunchEvent")
      --
      punchEvent.OnServerEvent:Connect(function(player, damage)
      local character = player.Character
      if character then
      local origin = character:FindFirstChild("HumanoidRootPart").Position
      local radius = 5 --
      --
      for _, obj in pairs(Workspace:GetDescendants()) do
      -- Check if the object has a HumanoidRootPart and a Humanoid
      local humanoidRootPart = obj:FindFirstChild("HumanoidRootPart")
      local humanoid = obj:FindFirstChild("Humanoid")
      if humanoidRootPart and humanoid then
      local distance = (origin - humanoidRootPart.Position).Magnitude
      if distance

    • @franciscahelenamesquita409
      @franciscahelenamesquita409 23 дні тому

      local punchEvent = game.ReplicatedStorage:WaitForChild("PunchEvent")
      local damageAmount = 10
      local function onPunch(player)
      local character = player.Character
      if character then
      local humanoid = character:FindFirstChild("Humanoid")
      if humanoid then
      for _, target in pairs(workspace:GetDescendants()) do
      if target:IsA("Model") and target ~= character then
      local targetHumanoid = target:FindFirstChild("Humanoid")
      if targetHumanoid then
      targetHumanoid:TakeDamage(damageAmount)
      end
      end
      end
      end
      end
      end
      punchEvent.OnServerEvent:Connect(onPunch)

    • @Your_editsBoii
      @Your_editsBoii 22 дні тому

      /copy

  • @AbxStudioz
    @AbxStudioz  Місяць тому +4

    Credit to kuro the dev

  • @SpydeGD
    @SpydeGD 11 днів тому

    Hey, this works well and I like it, but the range is quite extensive. It's so far-reaching that it affects everyone in the server. Could you create a tutorial on how to adjust that?

  • @XXGKET45
    @XXGKET45 9 годин тому

    Bro how can u tye r6 script??

  • @changingmyytcauseitscringe
    @changingmyytcauseitscringe 20 днів тому

    can u make a tut on how to make a health bar?

  • @ATFilho_Brother
    @ATFilho_Brother Місяць тому

    someone help me pls, I’m in iPhone and every time I try to put on the api key a black screen covers the game and I don’t see anything

    • @junaidsirenheadroblox8069
      @junaidsirenheadroblox8069 29 днів тому

      I can turn your phone sideways then copy and paste unless you have updated Roblox you can auto magically publish without copy and pasting api key

  • @PoreddyPujithareddy23
    @PoreddyPujithareddy23 Місяць тому +2

    Everything is fine but damage not workin

  • @Yashverse16
    @Yashverse16 Місяць тому +1

    bro not working
    for this i waste my 1 hour

  • @semiproshark
    @semiproshark Місяць тому +1

    is this works on PC??

  • @Sayedali-t7e
    @Sayedali-t7e Місяць тому +1

    How to create a game on my android

    • @shafiqahmed5839
      @shafiqahmed5839 12 днів тому

      you cant unless you use studio lite you can replace starter place

  • @Flametheflamebonnie
    @Flametheflamebonnie 17 днів тому

    It wont publish

  • @CarlLiteScripting
    @CarlLiteScripting Місяць тому

    Where's the r6 script?

  • @Sayedali-t7e
    @Sayedali-t7e Місяць тому +1

    punchEvent

    • @AbxStudioz
      @AbxStudioz  Місяць тому +1

      PunchEvent

    • @icz-editz
      @icz-editz Місяць тому

      ​@@AbxStudiozyo tutorial how to copy script? i'm still confused

    • @Sayedali-t7e
      @Sayedali-t7e 6 днів тому

      @@icz-editz yes

  • @Middle-Childd
    @Middle-Childd Місяць тому +1

    Omg mobile what !

  • @Sayedali-t7e
    @Sayedali-t7e Місяць тому +1

    RemoteEvent

  • @AnnymarQuezz
    @AnnymarQuezz Місяць тому

    android?

  • @hey-r6m
    @hey-r6m 29 днів тому

    Nice job lil bro

  • @Rivalsmaster-j4d
    @Rivalsmaster-j4d 25 днів тому

    I can’t find screen gui

  • @Nombre-c4r
    @Nombre-c4r 22 дні тому

    player.CharacterToca un clip para pegarlo en el cuadro de texto.local punchEvent = game.ReplicatedStorage:WaitForChild("PunchEvent")
    local damageAmount = 10
    local function onPunch(player)
    local character = player.Character
    if character then
    local humanoid = character:FindFirstChild("Humanoid")
    if humanoid then
    for _, target in pairs(workspace:GetDescendants()) do
    if target:IsA("Model") and target ~= character then
    local targetHumanoid = target:FindFirstChild("Humanoid")
    if targetHumanoid then
    targetHumanoid:TakeDamage(damageAmount)
    end
    end
    end
    end
    end
    end
    punchEvent.OnServerEvent:Connect(onPunch)