So, stuff doesn’t work in the actual game, but works perfectly normal in Studio…
What’s happening in-game:
vs. What’s happening in-studio:
I tried to use stuff like printing and waiting for the stuff to load, yet nothing results and no errors, warnings are passed and seem normal. The problem only applies to the actual game, and it’s really annoying since the problem is very common, if not all the time! It’s breaking my game, and I can’t find a solution to fix it!
If you are also experiencing issues with things only working in Studio but not in Roblox, please reply! Perhaps you could also give me some methods I could use to fix this myself!
When you test in roblox studio, your computer is the Server and Client, meaning there is no delay. In an actual game the server and client are two different machines, did you account for any possible latencies?
Well, the gun system is mostly client-sided with damage and rewards being handled on the server, so I don’t know if latency is causing the problem however. (the fact that it’s entirely client-sided and is exploitable isn’t my concern at the moment)
Even if your system is mostly client-side, you still need to account for any server dependencies—because even on a single-player server, it’s not as instant as running in Studio.
Also if you’re pulling models from ReplicatedStorage or ServerStorage, make sure to wait until all descendants are fully replicated. I ran into this once myself, was using RenderStepped to update positions on models from ReplicatedStorage, but didn’t wait for the model to actually finish loading on the client. That’s also why you’re not seeing any errors, replication issues are sneaky like that and harder to catch.
Yes. It welds the bodyattach correctly to the torso, but its just the problem with how it doesnt load fast enough is why the code doesnt work because its running before the tool is finished loading.