- What do I want to achieve
Fix this issue, detect the table in the module script - What solutions have I tried
Printing
- Heres my code
Module Script
function module.PartsBoundinBox(player, cFrame, size, overlapParams, func, ignoreSelf)
print("Used")
local character = player.Character
local humanoid = character.Humanoid
local hrp = character.HumanoidRootPart
local hitbox = workspace:GetPartBoundsInBox(cFrame, size)
local alrHit = {}
for i,v in pairs(hitbox) do
if ignoreSelf == true then
if v.Parent:FindFirstChild("Humanoid") and v.Parent ~= player.Character then
local target = v.Parent
local targhum = target.Humanoid
local targhrp = target.HumanoidRootPart
local info = {
targ = target,
}
func(info)
print("Im a sigma")
end
elseif v.Parent:FindFirstChild("Humanoid") and ignoreSelf == false then
local target = v.Parent
local targhum = target.Humanoid
local targhrp = target.HumanoidRootPart
local info = {
targ = target,
}
print(info)
func(info)
print("Reqiuem")
end
end
end
Server Script
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
task.wait(1)
local Hitbox = require(game.ServerScriptService.Modules.Hitbox)
local function Hit(info)
print(info)
end
Hitbox.PartsBoundinBox(player, player.Character.HumanoidRootPart.CFrame, Vector3.new(10,10,10),{}, Hit(info), false)
end)
end)