Is it good to use MouseButton1Click on server rather than client for security protection

I’ve had this idea in my mind for ages but unsure if it causes memory issues and gives the server insomnia from handling the clicks, I’m not even sure why ROBLOX even allows client sided clicks to run on the server but was wondering if its safe to handle clicks on the server rather than the actual client due to exploiters manipulating remote events.

2 Likes

To answer your question MouseButton1Click cant be detected on the server.
So you kinda gotta do it on the client.

If that wasnt your point then it depends what you are trying to do.
For instance, clicking on a UI that pulls up some UI shouldnt need a server sided check, but if you were firing a pistol you’d need to make sure you actually can do that

You can detect mousebutton1clicks on the server, I did it as demonstration and it worked.

1 Like

What security issues does pressing on the client cause?
there’s no reason for u to do it on the server

1 Like

Hmmmm well then I couldnt tell you. Unless you are using click detectors cause I think those can work on the server.

1 Like

Yeah pretty sure they only work for click detectors, its not even possible for other click use cases

1 Like

No i mean if an exploiter can manipulate the press remote event.

1 Like

You can use mousebutton1click on server, i’ve tried and it works, you just need to use the players gui instead instead of startergui.

It shouldn’t matter as the Roblox server will receive the instructions from the client anyways, the only reason to handle something on the server is if its non boolean: (true/false) value, because the server can handle calculations, that could be changed by a hacker on the client

1 Like

That makes no sense, you just gotta control the rate of sending the remotes, i dont see how you consider this as a game system security issue, if they choose to spam the click, then you have to make a fire rate that shouldnt be passed

Idk never tried it, and it shouldnt be used even if its accesable

No, im trying to explain to you that you can manipulate any remote event by looking at the local script with some expensive exploit and insert anything you need into the remote event parameters to exploit the server.

If you have a good remote receiver on the server end you shouldnt fear any of this stuff

I know but i need to know if using mousebutton1click on server rather than client causes server to be exhausted, im assuming it is but i need to know if its good practice.

like you cant just have a remote that adds money to a player
and you take the amount to be added from the player smth like: event:FireServer(10000),
something like that should be avoided from the first time you step into scripting

I dont rlly know, if it causes the lag on the server or not, but 100% doing it on the client is way more performance friendly

Oh ok, i’ll try working with using remote events which i seriously do not trust.

I only ever use remote events if i absolutely need to use them.

as long as the client isn’t handling any calculations or data storage it should be fine.

theyre easily exploitable and can fool the server is not used correctly so u can use them normally but just gotta be careful what you pass in and how you handle it from the server end