#Client-Side Module

29 messages · Page 1 of 1 (latest)

edgy epoch
#

Should I use 1 module for all clients to use for things such as tweening sounds in client side, etc? or should I place the module in playerscripts, etc. making it 1 module for every player?

mighty ledge
edgy epoch
#

Module script

mighty ledge
#

and what does the module contain?

edgy epoch
#

Functions to tween sounds volume (tween service), frames, etc.

mighty ledge
#

oh, i see, i think it can work by adding it in the "playerScripts", or you can also leave it in "ReplicatedStorage" and require it in your scripts

#

serves for both client and server the modules

#

if you don't know how to import them is this way:

local myModule = require(--[[ module directory ]]);
edgy epoch
mighty ledge
#

👍

river urchin
edgy epoch
#

wym?

river urchin
#

like wym for all clients and for only one

edgy epoch
#

1 module script for each client, or 1 module script for all clients to use

#

If i place it in playerscripts, then it will be 1 module for each client (player)

#

if I place it in replicated storage, then it would be 1 module script for all clients to use

river urchin
#

uh

#

i think it doesn't rlly matter

edgy epoch
#

also do you guys know what self is? When I call a function using module.function, it asks for an argument called self, if i use module:function, it doesnt.

mighty ledge
edgy epoch
#

this is when I use PlrCustom:MyFuction, it doesn't asks for a "self"

#

this is when I use PlrCustom.MyFunction

#

it asks for a self

mighty ledge
#

oh, do'nt use "PlrCustom.TweenSound()" with ".", use ":"

#

PlyCustom:TweenSound()

edgy epoch
#

alr

chrome tiger
#

1 modulescript for all clients

river urchin