#Punch1 is not a valid member of LocalScript "Workspace.Flipy_XYZ.Punch script" wtf

1 messages · Page 1 of 1 (latest)

ivory marsh
#

Soooooooooooooooooooooooooooooooooooooooooooooooooooooooooo I made a Puch anim and tried to load it but I get da error in da title when I play I can send the line

local Punch1 = hum:LoadAnimation(script.Punch1)

BUTTTT in the scrip there is a Animation called Punch1 exactly the same name

pls help or... idk

#

btw my guys`thats my full script:

local cas = game:GetService("ContextActionService")

local hum = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")

local Combo = 0
local attack = false
local lastpunch = 0
local debounce = false

--values
local Cooldown = 1
local Dmg = 10
local maxcombo = 3

--anims
local Punch1 = hum:LoadAnimation(script.Punch1)


local function Punch()
    if debounce then return end
    if tick() - lastpunch > 0.8 then
        Combo = 0
    end
    debounce = true
    print("Combo: " ..Combo)
    if Combo == 0 then
        attack = "right"
        game.ReplicatedStorage.RE.Punch:FireServer(Dmg,attack)
        Punch1:Play()
        wait(Cooldown)
        debounce = false
    elseif Combo == 1 then
        attack = "left"
        game.ReplicatedStorage.RE.Punch:FireServer(Dmg,attack)
        wait(Cooldown)
        debounce = false
    elseif Combo == 2 then
        attack = "right"
        game.ReplicatedStorage.RE.Punch:FireServer(Dmg,attack)
        wait(Cooldown)
        debounce = false
    elseif Combo == 3 then
        attack = "rightleg"
        game.ReplicatedStorage.RE.Punch:FireServer(Dmg,attack)
        wait(Cooldown)
        debounce = false
    end

    if Combo == maxcombo then
        Combo = 0
    else    
        Combo += 1
    end
    lastpunch = tick()
end

cas:BindAction("Punch", Punch, true, Enum.UserInputType.MouseButton1)
clever apex
#

send a pic of your explorer.. is punch1 a childer (under) the localscript?

#

when u run the game