Delayed Actions

Hello there. I do not have a clue of where to post this but I have a feeling that I found a bug. When I test my game inside Roblox Studio with a few guns, they fire instantly, but when I test them inside the Published Game, It takes a few seconds for a shot to go off. Again, i don’t know if this is a bug or a problem with my internet. I really want to fix this by having the following happen:

  1. What do you want to achieve?
    I want the guns to fire instantly and not having to wait for a few seconds.

  2. What is the issue? Include enough details if possible!
    The guns fire instantly in Roblox Studio while in the Published Game, they have a tiny delay, like a 3 - 5 second delay before a shot is fired.

  3. What solutions have you thought of so far?
    I have tried to reduce the part count by replacing most of the models into meshes but it had no effect in this whatsoever.

The other thing I tried to do was change my Internet connection to a Fast LTE connection but the delay was still there. I don’t know what is causing this to happen but I do not like it at all.

Please tell me if I have to remove this Post or where I can post this. Thank you

I could be wrong, but I do believe that play-tests still aren’t perfect compared to playing the actual game. Regardless, this would most likely be a scripting issue. Because of this I would move this to #development-support:scripting-support, and then post the code that you suspect is the culprit.

1 Like

Alright, thank you. I will now remove this post and move it there

Have you heard of lag? Chances are, you’re experiencing that, especially if you’re using regular server scripts that take input from players. See this for more info:

Trick is to fire the gun on the client side then relay to info to all the players and fire it on their clients. It’s a bit tricky but it leads to the best results!

This looks like latency is causing this issue and the good news is that Roblox may be doing some latency improvements in the future. At the moment all you can do is minimise the delay as much as you can by firing things on the client first and then transferring it to the server.