#Simple yet complex error

1 messages · Page 1 of 1 (latest)

wooden geyser
#

For some reason I'm getting this error when I try to run this script, can anybody help?

local RS = game:GetService("ReplicatedStorage") local Modules = RS:WaitForChild("Modules") local HitboxScriptFolder = Modules:WaitForChild("Hitboxes") local ModuleHitboxScript = require(HitboxScriptFolder:WaitForChild("ModuleHitboxScript")) local HitboxFolder = script.Parent while wait() do local HitboxFolderChildren = HitboxFolder:GetChildren() for i, child in HitboxFolderChildren do if (child:IsA("Part")) then local Hitbox = child local Damage = Hitbox:GetAttribute("Damage") Hitbox.Touched:Connect(function(part) local FindPartChild = part.Parent:FindFirstChildOfClass("Humanoid") if FindPartChild then local HitChar = part.Parent if HitChar:GetAttribute("IsKiller") == false then ModuleHitboxScript.HitboxDetector(Damage, HitChar) end end end) end end end

river niche
#

local RS = game:GetService("ReplicatedStorage")
local Modules = RS:WaitForChild("Modules")
local HitboxScriptFolder = Modules:WaitForChild("Hitboxes")
local ModuleHitboxScript = require(HitboxScriptFolder:WaitForChild("ModuleHitboxScript"))
local HitboxFolder = script.Parent

while wait() do
local HitboxFolderChildren = HitboxFolder:GetChildren()
for _, child in ipairs(HitboxFolderChildren) do
if child:IsA("Part") then
local Hitbox = child
local Damage = Hitbox:GetAttribute("Damage")
Hitbox.Touched:Connect(function(part)
local parent = part.Parent
if parent then
local FindPartChild = parent:FindFirstChildOfClass("Humanoid")
if FindPartChild then
local HitChar = parent
if not HitChar:GetAttribute("IsKiller") then
ModuleHitboxScript.HitboxDetector(Damage, HitChar)
end
end
end
end)
end
end
end

can u try it?

wooden geyser
#

alr

#

It works!

#

ty