Just looking for some clarification here.
Is the following scenario acceptable regarding security? While I accept the fact that exploiters will always be around, I’d like to make things difficult for them.
- Door is a descendant of workspace
- BoolValue “locked” and StringValue “key” are children of Door
- Script “doorscript” is child of Door (not a localscript), and requires DoorModule (in ServerScriptService)
“doorscript” will pickup a clickdetector mouse click event and calls a function in DoorModule, passing in (player, door).
DoorModule checks Door’s “DoorType” StringValue and handles accordingly. DoorModule will check if a door is locked, and if so (and requires a key), will check if the player has said item.
If the circumstance allows, DoorModule handles opening the door.
Is this safe and sane? My concerns are:
If an exploiter modifies BoolValue “locked”, will this remain client-side? (Will the door act properly and NOT open if they click the door?)
Is there a safe and sane way to handle door animations/tweening from the module script? And/or can it be handled in the doorscript?
Can all of the above be handled inside the doorscript? (Main concern here is repeating lots of code for lots of doors, e.g. checking if player has key)
I have tried moving my tween code from the child doorscript into DoorModule but the animation does not play currently. That being said, I still have troubleshooting to do… but if there is a better way to structure this, I’m all ears.
Thanks all!