So i'm following a tutorial for a battlegrounds game, and since i've added the downslam (Only animation and damage, doesn't slam you yet) the combat wont work as it should. Instead of doing the cycle of 4 punches, it instead plays the first hit only (unless you downslam). It also now says this
LoadAnimation requires an Animation object
when i click.
script for that part is
`combat_re.OnServerEvent:Connect(function(plr, args)
local char = plr.Character
local humanoid = char:FindFirstChild("Humanoid")
local hrp = char:FindFirstChild("HumanoidRootPart")
local is_punching = char:GetAttribute("Punching")
if is_punching then return end
local punch_type = args.Type
local anim = get_animation(char, punch_type)
local play_anim = humanoid:LoadAnimation(anim)
play_anim:Play()
char:SetAttribute("Punching", true)
`
Script for downslam is
`if curr_combo < 4 or punch_type == "Normal" then
for _, anim in animations:GetChildren() do
if anim.Name == "punch".. curr_combo then
end
change_combo(char)
return anim
end
elseif curr_combo == 4 and punch_type == "Downslam" then
return animations.downslam
end
end`
Thanks in advance
https://www.youtube.com/watch?v=KvnfGLS_1Ek
^Tutorial Link
This is the second part of this tutorial! You will learn how to create a Battlegrounds combat system in Roblox Studio in this helpful tutorial series. Get ready to build The Strongest Battlegrounds game!
Sorry for the short tutorial, I've been really busy these days.
Hitbox Module: https://create.roblox.com/store/asset...
#thestrongestbattleg...