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

Why all guns work properly in studio mode but game server ?

Asked by
Bulvyte 388 Moderation Voter
8 years ago

So i got some guns in my game. they all work in studio NEVER EVER breaks but in game servers its like 50% chances different guns work or not when you select. then you start flying and get stuck in the air Why does this happen ?

1 answer

Log in to vote
5
Answered by 8 years ago

Problem The only problem I can see is that since it works in studio and not in server it should be a latency problem, this happens because in studio everything is pretty much local so you don't have to wait for a server to create stuff so your local scripts run instantly. In server this doesn't happen as when a local scripts cause upons something in player or character that is server-sided then the local script is "local" which makes it run faster then the server can respond.

Solution

repeat wait() until game.Players.LocalPlayer.Character--To the top of every local script
0
I knew it, thanks to you! Bulvyte 388 — 8y
Ad

Answer this question