Are you sure the error is coming from your MessagingService script? From what I see you are not mentioning ServerScriptService anywhere in your script.
The error you are showing is not caused directly by the script you posted. Click the error in the output while the game is running to see what script and line is causing the issue. Please send relavent code to the error, and the image of the error, not just text.
Did you use LocalScript? In my current knowledge, it’s impossible to access ServerScriptService using LocalScript unless you’re also using RemoteEvent.