You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I wanna make a kill sequence that’s synchronized with my animation -
What is the issue? Include screenshots / videos if possible!
Literally nothing happens, not even damage or sounds -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried looking at the developer forum, importing a kill sequence from an old game, changing the humanoid names (they used to be called knights but now they’re just enemy)
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
The knight attacks work perfectly fine tho, as seen in the video
-- local debounce = false
local animation = script:WaitForChild('Animation1')
local Humanoid = script.Parent.Parent:WaitForChild('Humanoid')
local dance = Humanoid:LoadAnimation(animation)
local bites = {script.Parent.Parent.Head.Bite1,script.Parent.Parent.Head.Bite2,script.Parent.Parent.Head.Bite3}
local gore = {script.Parent.Parent.Head.Gore1,script.Parent.Parent.Head.Gore2,script.Parent.Parent.Head.Gore3,script.Parent.Parent.Head.Gore4,script.Parent.Parent.Head.Gore5}
function onTouched(hit)
local human = hit.Parent:findFirstChild("Enemy")
if (human ~= nil) then
if not debounce then
debounce = true
dance:Play()
Humanoid.WalkSpeed = 0
wait(1)
human.Health = human.Health - 20 -- Change the amount to change the damage.
bites[math.random(#bites)]:Play()
local weld = Instance.new("Weld")
weld.Part0 = script.Parent.Parent.Head
weld.Part1 = hit
local HitPos = script.Parent.Parent.Head.Position
local CJ = CFrame.new(HitPos)
local C0 = script.Parent.CFrame:inverse() *CJ
local C1 = hit.CFrame:inverse() * CJ
weld.C0 = C0
weld.C1 = C1
weld.Parent = script.Parent
wait(0.55)
human.Health = human.Health - 80 -- Change the amount to change the damage.
bites[math.random(#bites)]:Play()
gore[math.random(#gore)]:Play()
wait(0.45)
Humanoid.WalkSpeed = 15
weld:Remove()
wait(3)
debounce = false
end
end
end
script.Parent.Touched:connect(onTouched)
Please help i even tried making it a small little damage script and not even that works
function onTouched(hit)
local human = hit.Parent:findFirstChild("Enemy")
if (human ~= nil) then
human.Health = human.Health - 20 -- Change the amount to change the damage.
end
end
script.Parent.Touched:connect(onTouched)
Not even this works and the output says no errors i need help.
Video:
(the hitbox is supposed to trigger the kill sequence btw)