Ok, first, this isn't script begging, I don't need a script from someone, but something to base my script off would be nice. For the past few days I've been putting my game's development on hold to create anti-cheats that the average player wouldn't encounter. So far I've prevented No-Clipping, Flying, Infinite Jumping, and a list of other common exploits. My game is going to have tools that spawn periodically and you have to find them, but I figured an exploiter could just do something like
local w = workspace:GetChildren() i, v in pairs(w) do -- Check if it's a tool and if it is set its parent to their backpack -- But I assume they shouldn't be able to since filtering enabled -- But that doesn't prevent them from teleporting themselvse end
I already "have" an anti teleport that checks for the character's last position and compares it to the next. Problem is my game allows the player to travel really fast (it's a core gameplay mechanic) and I can't detect teleporting under around 200 studs. Now you see my issue.
My question is;
Is there a way I could use something like magnitude or region3, or anything really to prevent the player from picking up tools they aren't near. (I've been searching this for 2 days now and I haven't been able to find anything or have any working experiments)
Note: I would like to keep it so you walk over tools and not something like E to pickup