Hello!
I was working on a certain project of mine and ran into a very simple issue:
a simple .touched() evenet was not firing.
Here is the script:
local DB = true
script.Parent.Hitbox.Touched:Connect(function(hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum and DB then
DB = false
hum:TakeDamage(35)
StabAnim:Play()
task.wait(1)
DB = true
end
end)
In this case, when a player touched the part named Hitbox it should get damaged. Easy, right?
Well, it somehow doesn’t work. I checked if .CanTouch was enabled, which it is, and even tried to put a print("touch"), but it never gets there.
Here is an example with the print("touch") inside the script:
I seriously have no idea how to fix this.