Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Every time I make a script, it doesn't fire in a published game. Reasons?

Asked by 6 years ago

There's not much to say here because I have no idea what is going on. It's happened with almost EVERYTHING I do, and it's REALLY starting to get on my nerves.

I get scripts working fine in the studio. They function exactly as they should, doing exactly what I want when I want, and I decide to finally insert them into the game and test them. All good. Unless you actually join a game.

You see my problem is: My scripts work flawlessly in studio but don't fire at all in an actual game ('an actual game' here means going to the game page on roblox and clicking 'play'). I've used the Developer Console to look for an explaination, but everything there is working perfectly.

This is not happening on localscripts, this is happening on normal scripts. If anyone can help me fix this, I'll be extremely grateful. This is the bane of using ROBLOX Studio for me, as it's always happened and it is very infuriating.

0
This happens to me often as well and is quite annoying. I'm not sure how to exactly fix it, but I fixed it once. I put the code from the script that wasn't working in the server into a different script, and then it worked. LawlR 182 — 6y
0
It usually happens because of improper server-client communication and/or replication issues. Since in studio play mode, the server and the client are the same peer. Please post more details, such as where are the scripts placed and their source. Amiaa16 3227 — 6y
0
What do your scripts do? hellmatic 1523 — 6y
0
really depends on what your script does. If it's a server script and does something to the client side then it won't work in an online game. In studio all scripts are local and online game all local scripts and regular scripts are separated awesomeipod 607 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

I suspect that you're trying to do things with Scripts that don't work in a full server, like trying to access PlayerScripts or PlayerGui.

There's a cool function in Roblox Studio that actually lets you emulate a server, unlike the "singleplayer" mode that you've been using up until now. It lets you see errors that would happen when your game is actually live, both on the client, and more importantly, server. To access it, go to the "Test" tab in Studio, and click the "Start" button. You can adjust the amount of players in your virtual server as well, if you're testing somthing that requires that.

It will take awhile, but two windows will open; one where you control your player, and one where you control a flying camera, the one with the flying camera being the server. I suspect that if you look in the server window's console, you'll see a lot of red text ;P. Debug that, and things ought to work fine online.

While this full test mode is more accurate to real life than singleplayer mode, it is also way more inconvenient, so only use it to debug the stuff that singleplayer mode isn't catching. I always try atleast one full server run before I publish anything.

Good luck, hope this helped!

0
Still no red text, scripts still don't work DANISSY1 2 — 6y
Ad

Answer this question