Working properly in Roblox Studio, but breaks when played as a normal game

In this game, players control a sphere. This sphere is able to move in any direction, and jump. The problem I’m having is that when I play it as a normal game, the sphere jumps and moves randomly. In Roblox Studio, it works fine, and doesn’t glitch at all. If anyone could help me solve this, or at least figure out what the problem is, it would be greatly appreciated.

EDIT: The output shows an error message that says “exception while signaling: InsertService cannot be used to load assets from the client”, can someone please explain what this is, and how to fix it?

Here’s an example of how it works in Roblox Studio:
https://gyazo.com/7e988e7d94b6a6a3e16bc6797cd368d921

And this is how it works when you play the game normally:
https://gyazo.com/598a07ff6dbc3bc8f824c5b5c363188019

1 Like

Your gyazos are 404. Just use ShareX.

Please don’t make multiple posts for the same question.

1 Like

Sorry, I thought it would be better to create a new post, and I assumed that very few people, if any, would see the old post.

Here, these are updated GIFs:

Roblox Studio:
https://i.gyazo.com/e0edbaf056069d5c332d24f38eb52f76.gif

When played as a normal game:

If you’re using this to test in Studio:
image

…then you won’t be getting results accurate to the actual game. This is due to the server & client running from the same instance, which changes how things like physics and replication works compared to live servers. You should be using the “start server” testing method instead. This way, you can monitor what’s happening better.
image

3 Likes

I’ve only used that for testing multiplayer, but I’ll definitely try using it to solve this. Will it be easier to find the problem using this? Right now, I don’t know what’s causing the problem, so I can’t start working on a solution.

1 Like

It’s not working in-game because your localscript changes aren’t replicating to the server like they are in play solo. Here’s an explanation of what the difference between the client and server are, and what replication is:

http://wiki.roblox.com/index.php?title=Experimental_Mode#Experimental_Mode_and_Client-Server_Model

If you want it to show up in-game, you have to make the changes from the server. You can allow the client to request changes to be made with RemoteEvents/Functions, but ultimately the server needs to make the change.

1 Like

Can you explain how to do this? I don’t know where to start in terms of changing the script.

  1. Find what isn’t working
  2. Find where you make that change in a LocalScript
  3. Change your game so that behavior is done through a ServerScript

Repeat until everything is working.

The only error that’s shown in the output is this: "exception while signaling: InsertService cannot be used to load assets from the client"
I don’t know what to do to solve this.

The error message tells you how to solve it. InsertService can’t be used on the client – you have to use it on the server (from a Script – not a LocalScript).

2 Likes

The script I’m using is in StarterPlayerScripts, and I don’t see an option to add a normal script. Does this mean that it has to be a LocalScript, or can I put the coding into a normal script and have it somewhere other than StarterPlayerScripts?

You can put the coding into a normal script and have it somewhere outside of StarterPlayerScripts (e.g. ServerScriptService). If you need your server script and local script to communicate, you can use RemoteEvents and RemoteFunctions – here is a tutorial on how to use them.

The script needs to stay in StarterPlayerScripts, and I don’t think it’s possible to change this specific LocalScript to a normal script. I don’t really know how to use RemoteEvents and RemoteFunctions, and I think I would need some help other than the Roblox Wiki to achieve this.

1 Like