While I was creating a project involving an FPS viewmodel, I was thinking, couldn’t an exploiter delete the local viewmodel which is parented to the client’s camera? How would I prevent this?
You could prevent it buy putting it in ReplicatedStorage(client based service) then using a local script to move it, ensuring Filtering Enabled is enabled
What do you mean? That’s exactly what I’m doing.
Given that exploiters have the same power as the client in Studio test mode (I assume), I can just delete the viewmodel parented to the client camera.
So how would I prevent this?
You can’t. Why do you want to prevent it anyway? If they delete it that’s only bad for them and doesn’t affect anyone else
Yes, exploiters can delete anything client-sided. There’s no way to prevent this.
I was thinking more along the lines of games such as CS:GO where the space the gun had occupied would’ve partially blocked the players vision. By deleting the viewmodel they could gain an advantage, especially when using larger guns which are supposed to occupy more of the screen.
I was thinking of checking if the viewmodel existed before allowing the player to fire their weapon, however, I assume exploiters can modify local scripts, which would make such checks pointless.
That’s not an argument they’ve used for that design choice. Players are perfectly able to modify where on the screen the viewmodel is positioned to partially get rid of it.
Yes but unfortunately, there’s a lot more ways they could gain advantage, for example by increasing their camera FOV. Client sided actions like these can’t be prevented
Mechanics shouldn’t rely on whether the viewmodel exists or not. In fact, the viewmodel is just for visuals and should be relying on backend code rather than the backend code relying on the visuals.