#Remote Events
1 messages · Page 1 of 1 (latest)
u kinda can
if u require the module at the beggining of the script
u can put the OnserverRemote on the module
it would work fine
I think u can
cus I use Players.PlayerAdded in there
works fine
I usually just require the module
to save time
It looks really messy, is it better if I just scrap the module script
Hold on^
Yeah
So you want a Local -> Module remote event?
Yeah
You can surely do that if the Module is required already by another script
yea
Alright hold on let me try this
Is there a way to just call a function in the module script from a client but have it run on the server?
Like
Client:
Module.Function(A,B)
Module Script:
Module.Function = function(A,B)
--> Runs on the server
or do i have to use remote events
u gotta use remotes
Aight
My script is in replicatedstorage
and it says i cant only use onserverevent on the server
is that because its in replicated storage
or because its a module script
Is your module on ReplicatedStorage?
and if its because its in replicated storage i'll just forget it for now
because it will take ages to change all the scripts that require modules
??
So it SHOULD be in the server right
if thats what u wanna do then go ahead
but the difference is, Modules can either be by Client Only or Server Only
From what i know so far
If a Server Script is using it, Yes.
Well i mean originally it worked regardless
My module creates hitboxes when the functions are called on a server script
Wait show me the error
im confused by this
😭
Thats what I was trying to avoid, it looks messy
but if its required to do then i don't mind
Then organize it..?
Wait
Literally use Folders for it 😭
its just a long line of this
I check the input on the client
I fire a remote event if something needs to be done on the server
Is this in the module?
If there is nothing i can do its fine
so just place it in the serverscriptservice
it works#
then change the variable to require it to where the module is now located
Alright
Cause if your using Server only Stuffs e..g; OnServerEvent
Honestly i don't know if there is a point of keeping all this stuff in a module script anymore but i might as well