#problem with module script
1 messages · Page 1 of 1 (latest)
script where the module is required
local UserInputService = game:GetService("UserInputService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local HitboxModule = require(ReplicatedStorage.Modules:WaitForChild("HitboxModule"))
local character = script.Parent
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
function Hitbox()
local hitboxDuration = 10
local hitboxPart = HitboxModule.createTemporaryHitbox({
Size = Vector3.new(5, 5, 5),
Position = humanoidRootPart.CFrame * CFrame.new(0, 0, -5),
Duration = hitboxDuration,
Debounce = hitboxDuration + 0.1,
NumOfHitboxes = 10,
OnHit = function(hitPart, hitEntity, humanoid)
if humanoid then
humanoid.Health -= 10
print(humanoid.Health)
end
end,
FilterInstances = {character},
})
end
while true do --testing purposes
Hitbox()
wait(10)
end
I'm sorry but almost no one will read a 200+ lines script, add print statements in your module to find where the bug is
awh