I’m making a magic game and I’ve started scripting a simple projectile, I use a RaycastHitbox module for the projectile and it works perfectly
Though the projectile is also damaging the caster and I have no idea how to fix it
Module: Raycast Hitbox 4.01: For all your melee needs!
Script inside of the projectile:
local RS = game:GetService("ReplicatedStorage")
local RAYCAST_HITBOX = require(RS.RaycastHitboxV3)
local newHitbox = RAYCAST_HITBOX:Initialize(script.Parent)
newHitbox.OnHit:Connect(function(hit, humanoid)
humanoid:TakeDamage(5)
script.Parent:Destroy()
end)
newHitbox:HitStart()