#Punch1 is not a valid member of LocalScript "Workspace.Flipy_XYZ.Punch script" wtf
1 messages · Page 1 of 1 (latest)
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)