Hello, im having a problem with this module.
Everytime i reset my character gets damaged by his own tool again.
At first it works but then after he dies it doesnt.
Im using the raycast made by TeamSwordphin
Script:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RaycastHitbox = require(ReplicatedStorage.RaycastHitboxV4)
local tool = script.Parent.Parent
local cd = false
local plr = game.Players.LocalPlayer
local MyCharacter = plr.Character or plr.CharacterAdded:Wait()
local handle = tool.Handle
local hitbox = tool.hitbox
local Params = RaycastParams.new()
Params.FilterDescendantsInstances = {MyCharacter}
Params.FilterType = Enum.RaycastFilterType.Blacklist
local newHitbox = RaycastHitbox.new(script.Parent)
newHitbox.RaycastParams = Params
newHitbox.Visualizer = false
newHitbox.DebugLog = false
newHitbox.OnHit:Connect(function(hit, humanoid)
if newHitbox.RaycastParams == Params then
print(hit)
humanoid:TakeDamage(30)
end
end)
tool.Activated:Connect(function()
if cd == false then
cd = true
wait(.425)
newHitbox:HitStart()
wait(1)
newHitbox:HitStop()
wait(1.725)
cd = false
end
end)