Why do this with UIs?

So I recently came across a set of UIs which contain not only localscripts but server scripts as well as remote events within the UI - allowing these server scripts to modify server workspace.

I was wondering what the drawbacks of this was and why anybody would do this.

4 Likes

Doesn’t seem to be of any harm for me.

2 Likes

Would it not mean that the client is running server code though? Leading to security problems?

1 Like

Depending on the use for the UI, the local scripts, server scripts and remote events might be needed if the UI is used to manipulate/interact with the server. Do note, that exploiters can fire RemoteEvents, so it is advised to implement checks in the local and server scripts.

1 Like

Would it not be better to keep events within ReplicatedStorage though?

1 Like

I’m not that advanced in scripting, but I believe it’s to find the event easier. It’s probably like that because it’s the only required event that will be needed. I am not sure though, sorry if this is wrong.

1 Like

No the code is still being run by the server. No hacker can penetrate the server script.

1 Like

Does it make more sense to keep it there rather than having it inside something like ServerScriptService?

1 Like

Usually I see this inside of toolbox items, where they put everything in one place so all you have to do to set it up is to move the item into a Service and it works

1 Like

No but some psychopaths do consider putting it there. I am just telling OP that its nothing to worry about mainly.

So is it better practice to keep it in the UI rather than ServerScriptService?

No its not a good practise. I am just saying its harmless.

Ah ok I didn’t know which way round you were talking about it lol. Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.