#3 Punch combo like those battle ground games
71 messages · Page 1 of 1 (latest)
** You are now Level 1! **
nah
dam.
idk
since you know about google n youtube
Hello there! This is a tutorial on how to make a fully functioning punch script which can be used in fighting game. Let me know if you want to see a part 2 where are add stun or knockback!
Songs:
- Stickerbrush Symphony by Michiko Naruke
- Lofi hip hop lofi by Enokido
- Lofi 2 by JamaBeats
Pastebin: https://pastebin.com/npTq5cS2
Join the D...
that isnt
what we tryna do
its like those battleground games
3 punches all the punches are different
the one youtube video we found had no script
local cas = game:GetService("ContextActionService")
local rs = game:GetService("ReplicatedStorage")
local events = rs:WaitForChild("Events")
local hitboxEvent = events:WaitForChild("Hitbox")
local plr = game.Players.LocalPlayer
local character = plr.Character or plr.CharacterAdded:Wait()
local hum = character:WaitForChild("Humanoid")
local animator = hum:WaitForChild("Animator")
local leftPunch = animator:LoadAnimation(script:WaitForChild("LeftPunch"))
local rightPunch = animator:LoadAnimation(script:WaitForChild("RightPunch"))
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
rightPunch:Play()
hitboxEvent:FireServer(Vector3.new(3,3,3), Vector3.new(2), 10, 0.3)
task.wait(0.4)
debounce = false
elseif currentPunch == 1 then
leftPunch:Play()
hitboxEvent:FireServer(Vector3.new(3,3,3), Vector3.new(2), 10, 0.3)
task.wait(0.4)
debounce = false
elseif currentPunch == 2 then
rightPunch:Play()
hitboxEvent:FireServer(Vector3.new(3,3,3), Vector3.new(2), 10, 0.3)
task.wait(0.8)
debounce = false
end
if currentPunch == 2 then
currentPunch = 0
else
currentPunch += 1
end
lastPunch = tick()
end
cas:BindAction("Punch", punch, true, Enum.UserInputType.MouseButton1)
in the local script
make left punch
right punch
animation
done
there are 3 punches tho
add it
aight
oh ai
he wants 3 tho
hi
How To Make Battlegrounds Combat System Part1 (Roblox Studio)
This is the first part of the tutorial
I'll explain how to make a battlegrounds combat system
-*/*/*/*/*/*/*/*/*/*/*/*/*/*/*-
Tomato Hitbox Module: https://www.roblox.com/library/14727086536/TomatoHitboxV1
CombatServer: https://pastebin.com/WsNdpURU
Main: https://pas...
done
does this include hitboxes, dmg and other things or just the punches?
this urs ya
server script
local rs = game:GetService("ReplicatedStorage")
local events = rs:WaitForChild("Events")
local hitboxEvent = events:WaitForChild("Hitbox")
function newHitbox(character, size, offset, damage, linger)
local hrp = character:FindFirstChild("HumanoidRootPart")
if hrp == nil then return end
local weld = Instance.new("WeldConstraint", hrp)
local hitbox = Instance.new("Part")
weld.Part0 = hrp
weld.Part1 = hitbox
hitbox.Transparency = 1
hitbox.CanCollide = false
hitbox.CanQuery = false
hitbox.Massless = true
hitbox.Size = size
hitbox.CFrame = hrp.CFrame + hrp.CFrame.LookVector * offset.X + Vector3.new(0,offset.Y)
hitbox.Parent = character
hitbox.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") == nil then return end
for _, v in pairs(hitbox:GetChildren()) do
if v:IsA("ObjectValue") then
if v.Value == hit.Parent then return end
end
end
local hitCounter = Instance.new("ObjectValue", hitbox)
hitCounter.Value = hit.Parent
hit.Parent.Humanoid:TakeDamage(damage)
end)
game.Debris:AddItem(hitbox, linger)
end
hitboxEvent.OnServerEvent:Connect(function(plr, size, offset, damage, linger)
newHitbox(plr.Character, size, offset, damage, linger)
end)
mb
mine
where do i put this script?
k
na thas fine I just wanna see if it works then I can make edits