I’m having a problem where when I try to call a function (not a local function) from my module script, it doesn’t find it. This is my first time using a module script though.
Relevent Code inside my serverscript:
local GladiusModule = require(game.ServerStorage:WaitForChild("GladiusModule"))
--Later in my code:
GladiusInUse.Changed:Connect(function()
print("Gladius Module Being Called...")
GladiusModule.equipGladius(Gladius, SheathedGladius, GladiusInUse)
end)
My entire modulescript so far:
local GladiusModule = {}
--Config Variables
local GladiusDamage = 25
--Misc
local GladiusDebounce = false
local GladiusCanDamage = true
function equipGladius(Gladius, SheathedGladius, GladiusInUse)
if GladiusInUse.Value == false then
for i, part in pairs(Gladius:GetChildren()) do
if part:IsA("Part") or part:IsA("MeshPart") or part:IsA("BasePart") then
part.Transparency = 1
end
end
for i, part in pairs(SheathedGladius:GetChildren()) do
if part:IsA("Part") or part:IsA("MeshPart") or part:IsA("BasePart") then
part.Transparency = 0
end
end
else
for i, part in pairs(SheathedGladius:GetChildren()) do
if part:IsA("Part") or part:IsA("MeshPart") or part:IsA("BasePart") then
part.Transparency = 1
end
end
for i, part in pairs(Gladius:GetChildren()) do
if part:IsA("Part") or part:IsA("MeshPart") or part:IsA("BasePart") then
part.Transparency = 0
end
end
end
end
return GladiusModule