Does anyone else validate characters?

I came across a comment in the forum then went and tried it out on my scripts.

Yep, my scripts broke.

The comment is about hackers deleting parts of their character to break server scripts. (What hackers can/cant do - #6 by TopBagon).

I decided to use a module script that checks to make sure all the parts I need are there and that they actually are what they say they are (as in ClassName) before allowing the script to execute.

I wrote it and tried it out. Works great.

My worry is that I don’t actually know what I am doing and that this idea may be a terrible way to handle it.

Has anyone else tried something like this?

1 Like

This is a great way to handle it. I have a lot of experience with how exploits and client-sided scripts work, and this will probably solve most of your issues. You could also just use if statements to make sure your server script works fine. Reply to this if this didn’t answer your question correctly.

Thanks so much.

I am about to start programming my game “for real” this time.

By using a quick check I feel like I can just use the dot instead of a bunch of FindFirstChilds and WaitForChilds. Because the module just confirmed all the parts and paths are valid.

True?

Unless they were deleted, this should work. If they aren’t existing, then the script will error.

What “they” do you mean?

I realize there is a nano second between the return from the module and the execution of the script. Yes, they could delete something in that fraction of a second. Is that what you mean?

No, I meant indexing the character. The dot operator will error if something does not exist, so you will need to plan around it.

Oh.

No, the module script is very detailed and specific and will return false if something is not right with the character. That’s the idea - to get an “all clear” before executing the main script that uses dots.

1 Like