I have a Screengui which holds a local script and a server script, however, when in a game the server script never runs. I tried putting a print at the start of the script to see it will even print that out, but it doesn’t.
Is there something preventing the script to run? What can I do to fix this issue?
This isn’t specifically the case.
It’s caused by FE, but server Scripts do run in PlayerGui and its decendants. What’s happening here is probably the fact that in FE the StarterGui only places the guis locally. Anything in StarterGui will go into the PlayerGui locally but will not replicate back to the server, and in this case, the Script is never ran by the server because the server is never aware it exists.
Possible ways to circumvent this are manually cloning the guis into PlayerGui from the server, and as such the code would/should run both LocalScript and Script. Whether it’s good practice or not I’m not one to tell.