Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Unable to find module for asset id? Module is named "MainModule"

Asked by 5 years ago
Edited 5 years ago

"Unable to find module for asset id" error, I saw that this is caused because the module is called "ModuleScript" or something else and it should be named "MainModule". But my module is named "MainModule" and I'm still getting the error. HTTP Services are on, can anyone help please?

PS: The module, when required on the account that has published it works completely fine, doesn't work if another account requires the same module

local module = {}

local plr = game:GetService("Players").LocalPlayer

if script.Parent:FindFirstChild("lightChangeRE") then
    script.Parent:WaitForChild("lightChangeRE").Parent = game:GetService("ReplicatedStorage")
end

local lightChangeRE = game:GetService("ReplicatedStorage"):WaitForChild("lightChangeRE")


--// functions

lightChangeRE.OnServerEvent:connect(function(plr, event, selcolor, light, EC, BC, FC, ALL, brightness, speed)

toggle = false



--[[

if event == "lightChangeRainbow" then
    for i,v in pairs(light:GetChildren()) do
                    spawn(function()
        while true do
            wait()
             local start = v:WaitForChild("MainLight").Color
             local End = Color3.new(math.random(),math.random(),math.random())
            for i = 0,1,speed do
    wait()
                local color = start:lerp(End,i)
                v:WaitForChild("MainLight").Color = color
                v.Color = color
                 end

start = End
        end
        end)
    end
end

--]]


if event == "lightChangeRainbow" then
    toggle = true
    for i,v in pairs(light:GetChildren()) do
                    spawn(function()
        while true do
            if toggle == true then
            wait()
             local start = v:WaitForChild("MainLight").Color
             local End = Color3.new(math.random(),math.random(),math.random())
            for i = 0,1,speed do
    wait()
                local color = start:lerp(End,i)
                v:WaitForChild("MainLight").Color = color
                v.Color = color
                 end
            elseif toggle == false then
                break

            end

        end
        end)
    end
    end




end)
return module

0
Can anyone help me on this? ShiforRBLX 5 — 5y
0
Maybe if you posted the script. We don't read minds. User#19524 175 — 5y
0
Updated. ShiforRBLX 5 — 5y
0
Show the script that require()'s it? Shawnyg 4330 — 5y
0
does it work in game on other accounts? the8bitdude11 358 — 5y

Answer this question