Hello, my UI takes...?

Hello, this is a apsa´, but don’ t worry

I would appreciate if you could perhaps show some examples of the guis lagging and maybe a bit of the GUI opening and closing code, but I think the most likely problem is that your game is very laggy. I recommend making sure you didn’t use any infected free models.

Either your UI has a “wait(2)” somewhere before the opening line, or your game/device is laggy.
Like @sevasok said, please provide an example of the UI lagging. If you used free models, you could’ve injected a virus into your game.

Also, I believe this belongs in Art Design Support - Developer Forum | Roblox

1 Like

The wording on your variables and functions is very confusing and misleading. Though from what I have seen you don’t seem to have any wait statements so yeah as I said earlier your game is just really laggy

Does making the script confusing bring lag in the game? And like what things could slow the game? It has 6 songs that are repeated, the server talks to you for about 40 minutes, there is an animation of bending over, there is a system where the player chooses the music they want. Any of that? Or it may cause delay (I don’t have free models)

Make sure the script is in a LocalScript. Clients are way a lot faster than doing it in server. If you are using server-sided scripts, try using events. It might not be the fastest way but is the best way.

1 Like

You might be putting stress on the server with another script, causing the whole game to lag. Try and reduce any poor or ineffective methods your using.

How do I remove the injected virus?

You can remove any virus you may have by testing your game in Studio>Solo and viewing your Explorer tab. There’s all kinds of viruses out there so be careful when using free-models! Viruses tend to spread once your game is launched and it affects the game server by constantly replicating objects into your Workspace, Lighting, etc.

I do agree you should show a GIF or short clip of your GUI ‘lagging’ so we can further assist you!

No making the script confusing doesn’t bring lag. It just makes it hard to understand from a third parties perspective. And what do you mean by the server talks to you for 40 minutes. Do you mean you have a script spamming print statements in output?

The server tells you game data, curious things, every 140 seconds the server sends a message to each player according to the time they are in the game, each player gets a different message.

Ok, I’l, tyr it, thank you, mmm i thinm it ok

1 Like

One question, I have the same problem with blocks that kill you, they take time to kill you. Do you think I should change them to LocalScript?

You can’t use local script for all cases. With LocalScript, the scripts apply for the local player only. And in that kill brick case, it must be a Script to change health of the humanoid. Basically, use LocalScript for the UIs only.

Also, please mark my previous post answer as solution if it deserves. Happy to help.

Oh yeah just wanted to let you know. Since now you are using a local script for your GUI every time you need to interact with the server you will need to use a remote event.

Okay thanks, it’s just the same with cheating

I don’t understand, why use that, the UI works fine now and I don’t have the remote.

Well for example if your GUI needs to interact with a server variable you would need to use a remote to interact with a server script so that server script can change the value of that server variable.