Character Script replication

Can someone clarify how Character replication works, specifically with Scripts? Why is a LocalScript able to Destroy Scripts inside the Character? I understand that the client has control over the Character itself, I’m just wondering about the specifics for Scripts

1 Like

It cant, only local scripts (unless server sided script does it). Characters replicate like every other object. They are just meshes and whatever with their network owner automatically set to the player so that their local movement replicates to others.

That’s what I thought, but:

You can upload Roblox directly on to the DevForum FYI :wink:

In FilteringEnabled, certain objects are given ‘network ownership’ by the client. These are things that require quick feedback without latency (such as the player’s character, or a vehicle they are controlling). The client can change any object with network ownership, and those changes will be replicated to the server and other clients. This is just to clarify, really.

If you’re looking at doing something important on the client, remember these two things:

  • The exploiter will usually be able to do whatever they want regardless of what systems you put in place
  • If the exploiter breaks something, it’s their fault for messing with the client and you do not need to be responsible for it (it sounds like you are trying to stop your game being broken or something for the player if they do something stupid, which is why I wrote this)
1 Like

Yeah so I understand that, but I was thinking this would apply to Parts, but I’m specifically asking about a Script (server) in the Workspace. Is what you’re implying that because the player has Network Ownership of their character, it also includes a server sided Script in their character?

1 Like

Yeah, I guess. If you’re unsure and want to verify something, just run accurate play solo/a local server and try deleting something on the client through the explorer – then go into the server’s view and see whether the change was replicated or not.

They cannot change anything. They can only change the position, orientation, and velocity of non-anchored BaseParts (given that its network owner is said client). If welds, Motor6D, or other non-part instances that replicate are modified, nothing will happen for other users, nor the server. Network ownership cannot be given to objects that are not BaseParts. This ‘deletion’ problem is just a local thing. The joints are not modified because the physics is also locally simulated in order to keep the objects in-tact.

Use my RBLX file, or test it yourself. A LocalScript CAN Destroy() a Server script within the same Character, and it’s not a local thing. Check on the sever, the Script is gone.

Yeah, I reproduced the behavior on both accurate play solo and a live server.

I had the following scripts. if you’re wondering about the integrity of my testing:


delay(5, function()

while wait(1) do
    print("Running on the client")

Server Script

while wait(1) do
    print("Running on the server")

odd, have you tried creating any? it might just be something the client is allowed to do bc thats how the scripts were written