For a combat system how its walk,
-
when the anim is played and it touches a rig then it tooks damages?
-
when one of the arms or legs touches the Dummy then it tooks damages?
For a combat system how its walk,
when the anim is played and it touches a rig then it tooks damages?
when one of the arms or legs touches the Dummy then it tooks damages?
Please refine your question, I can’t seem to understand what you are requesting help with.
yes ! i refine my question, sorry !!
I’m sorry I still don’t understand.
local damageAmount = 20 -- How much damage the player takes
local waitTime = 1 -- 1 = 1 hit max per second | 0.5 = 2 hits max per second
local deb = 0
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChildOfClass("Humanoid") then
if deb == 1 then
-- It is running and waiting
else
deb = 1
-- Run it
local char = hit.Parent -- Player's Character
local player = game:GetService("Players"):GetPlayerFromCharacter(char) -- Player variable if you need it for other things
local Humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
Humanoid:TakeDamage(damageAmount)
-- Add a wait before resetting
task.wait(waitTime)
deb = 0
end
end
end)
I do not understand your first bullet point, but there above is some related code for the second bulletpoint.