Help Me With MainModule please

I’m calling a MainModule with the requiere (), but it’s not working, it returns “Is the asset id correct and is the asset type” Model “?”, I don’t know why this is happening, it just happens in my new place a my old one usually returns what I call.

Could you post the content of that ModuleScript? Or at least parts of it where this would occur?

Is there anything you tried so far?

here is in a place
Screenshot_1
and here is another but the “requiere ()” doesn’t work
Screenshot_2

yes, but I couldn’t, I tried to use the command bar, but it still works in just one place, this can happen because the place I’m using is from a group?

Have you considered what it is erroring? IS the id a model? IS the id correct?

yes this is correct, until I’m using the same ID in the requiere ()

When requiring from an ID the module (the one you require) must be called “MainModule” (not the asset you post the actual script name)

If it is; just try inserting your module instead of requiring by ID.

I already published my module as “MainModule”

Why not just use the physical module? Is there a reason you don’t want it in-game?

yes it is because I use it in several scripts and it is better to access it through the requiere ()

You can require it the same whether it’s in-game or required through ID

require(pathToModule)
-- is the same as
require(assetID)

e.g:

local Convert = require(game.ReplicatedStorage.Convert)

print(Convert:ConvertShort(1000))

is there any option on a card prevents this function from working?

Yeah I checked the ID is corect
https://www.roblox.com/library/5084840082/ConvertShortModule
but I am not sure why it wouldn’t work. Try copying the Module from your place to the place you’re working in and then make a variable for it…?
local module = require(game.ReplicatedStorage.Module)

works perfectly this way, but I really need the requiere () function

You’re using require() either way. What do you mean?

Screenshot_3
Screenshot_4

this is really working in another place (I just posted it in another place) just my group’s place is not working.

I urgently need to fix this because I had to close my game for this error
;-;

It’s the same thing as @iiRealistic_Dev said. You’re still using require() the only difference is that you’re requiring the physical module in the place rather than the asset ID

1 Like

how to make a small script for me to try to understand?