#can't reference module script

1 messages · Page 1 of 1 (latest)

frank salmon
#

so im trying to make a fireball attack. for some reason my "carbp" is capable of being referenced from serverscriptservice yet my fireball attack wont? I keep getting " FireBallConstructor is not a valid member of ServerScriptService "ServerScriptService" . Is there something i'm missing?

quartz wind
frank salmon
solemn venture
# frank salmon so im trying to make a fireball attack. for some reason my "carbp" is capable of...

If you have not yet explored the client-server relationship that exists in Roblox, a simple way to test whether something is accessible by client-sided code is to load in a test session and take a look at the Explorer. If you cannot see what you are trying to access, neither can the client.

In your original script, the module would not be visible to the client and therefore could not be accessed. If you would like to access a module script from the client, I would suggest either:

  • Placing said module script in ReplicatedStorage (not advised for security purposes; anything on the client can and will be manipulated by potential exploiters)
  • Setting up client-server communication through RemoteEvents, which is ultimately the better option. Just a word of advice, always check the type of the data that is being passed through the RemoteEvent to further prevent exploiter manipulation.

If you have any further questions, or would like to make a correction, let me know!

frank salmon