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?
#can't reference module script
1 messages · Page 1 of 1 (latest)
You can't access ServerScriptService from the Client
thanks I didn't realize that was a thing
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 thetypeof the data that is being passed through theRemoteEventto further prevent exploiter manipulation.
If you have any further questions, or would like to make a correction, let me know!
If I were to go the RemoteEvents approach, first, i'm assuming I would have a script inside of the remote event to detect when the player presses the key assigned for the fireball attack? Will having this communication delay the input and response of the script? Also, assuming inside of a full server, would this slow down the game even more?