How to delete a model for the whole server except for the client that fired the event

Hello there! Hope ya’ll are having a great weekend!

So currently I had been working on a vehicle dealership system, and I had been trying to find a way to teleport the car while rotating it. Eventually i found out a good way, which was instead of using MoveTo() and PivotTo(), I could just use SetPrimaryPartCFrame. However, i ran into an issue, where if i dont fire a event for the server, the car wouldn’t set up (due to the fact that its a-chassis).

Currently what i need is a simple script that will delete a model for every other client but the one that fired the server event. I have been trying to think of some ways to do it but none of it really seemed to work on paper.

Let me know your thoughts guys!
I’m really grateful for you guy’s support!
Thanks!

So there technically is a way, but, you have to use a strict check.

I’d recommend using FireClient and a for loop. Loop through the players of the server GetPlayers() and ensure you do a few checks that;

a) Ensures the client that’s being fired isn’t the original player if otherPlayer ~= plr then
b) Ensure the model being deleted is ‘owned’ by the original player. If you do not perform any checks, technically speaking, someone could exploit the server and send every client the workspace model; therefore, deleting the workspace.

1 Like

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