Question regarding Value inside character

Hello mates! I’m making a game and encounter some problem.

So, I scripted a system where everytime character is spawned, Few bool value are created and parented to character.

However, exploiter might be able to delete it and mess up the entire system. Like the following:

Changing Bool value from client does not replicate to the server, so that is great

But, deleting the Bool value from client is replicated to the server and it may mess up my game system.

Does I need to add a system to check what is removed from character via .ChildRemoved and kick the player if certain value doesn’t exist/deleted? And so, why does deleting the value replicated to the server?

1 Like

What I would do is add an Attribute under the bool value (if you didn’t know Attributes are basically “custom properties” for an object) and set it as a bool named “ClientLocked” which is set to true. Then you can have a function which checks for the deletion of the value, and kicks the player if ClientLocked is true. Of course, if the game needs to delete the value, you can just have a different script set ClientLocked to false and then delete it.

1 Like

You can stop anything being deleted from your character from replicating to the server now:

1 Like

Thanks! This is what I’ve been looking for!

@CircDev Thanks for your suggestion, I appreciate your solution!

PS : I made a system that detect what have been removed from player.Character. I let this system run in case something goes wrong and client can replicate thing to the server.


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