#how can i make this local script as if a dummy was using it

5 messages · Page 1 of 1 (latest)

severe pollen
#

 local cas = game:GetService("ContextActionService")
local rs = game:GetService("ReplicatedStorage")

local events = rs:WaitForChild("event")
local hitboxEvent = events:WaitForChild("HitboxPunch")

local plr = game.Players.LocalPlayer
local character = plr.Character or plr.CharacterAdded:Wait()
local hum = character:WaitForChild("Humanoid")
local animator = hum:WaitForChild("Animator")


local lp = animator:LoadAnimation(script:WaitForChild("leftpunch"))
local rp = animator:LoadAnimation(script:WaitForChild("rightpunch"))
local fp = animator:LoadAnimation(script:WaitForChild("finisher"))

local DashSound = rs.Animations.Dash.DashEffect:Clone()


local currentPunch = 0
local lastPunch = 0

local debounce = false

local function punch()
    if debounce then return end
    if tick() - lastPunch > 1.5 then
        currentPunch = 0
    end

    debounce = true
    if currentPunch == 0 then
        rp:Play()
        hitboxEvent:FireServer(Vector3.new(3,3,3), Vector3.new(2), 5, 0.3, 10)
        task.wait(0.4)
        debounce = false
    elseif currentPunch == 1 then
        lp:Play()
        hitboxEvent:FireServer(Vector3.new(3,3,3), Vector3.new(2), 5, 0.3, 10)
        task.wait(0.4)
        debounce = false
    elseif currentPunch == 2 then
        rp:Play()
        hitboxEvent:FireServer(Vector3.new(3,3,3), Vector3.new(2), 5, 0.3, 10)
        task.wait(0.4)
        debounce = false
    elseif currentPunch == 3 then
        fp:Play()
        hitboxEvent:FireServer(Vector3.new(3,3,3), Vector3.new(2), 10, 0.3, 200)
        task.wait(0.8)
        debounce = false
    end
    
    if currentPunch == 3 then
        currentPunch = 0
    else
        currentPunch += 1
    end
    lastPunch = tick()
end

cas:BindAction("Punch", punch, true, Enum.UserInputType.MouseButton1) ```
lethal idol
#

wdym a dummy using it?

severe pollen
#

for testing

#

i wanna test out its stun and stuff

#

if my punch script is ok