Running a module script ONLY on the client

So I am trying to make an effect system for weapons using a module script. The module script is located inside starterPlayerScripts.The Module gets triggered from another module in repStorage. The reason I need the effects on the client is that the enemy models only exist on the client and on the server as pure data. So If I want to position an effect to the enemy I need the module running on the client. But Idk rly how because when I print something in the effect module (Which is as I said in startPlayerScripts it says it came from the server).

Is there a way to have a module ONLY run on the client?

3 Likes

do you mean use a module function only on the client? just require the module from a localscript and use the module i guess

1 Like

That could work but I trigger the module from the server… (This is important). So it still says its from the server

1 Like

try a remoteevent and use fireclient()

Try to require your ModuleScript from a LocalScript

1 Like

that was exactly what i said earlier

1 Like

I think you should provide a bit more information as to why you’re using a module script that is supposed to do client side effects on server. If you want it to run only on the client, then require it only on the client.

1 Like

oopsie didn’t see that sorries

1 Like

nah nah all good

thirty letters

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.