How to prevent exploiters from playing animations on Character?

We have been receiving many reports of players encountering exploiters in our game, Dandy’s World, who change their animations to play the anims of other characters in unintended ways. Often these are used maliciously. I am unsure as to how I would fix this because I don’t know how these kinds of exploits are executed, nor would I know a solution as the Character is owned by the players client, so the player is allowed to make any change they want to it with an Exploit/Executor. Any help on this issue would be appreciated.

Below is an example video showcasing someone playing unintended animations via exploits:

Maybe you can do something like this

local whitelistedAnimations = {}

for _, animationTrack in animator:GetPlayingAnimationTracks() do
    if not table.find(whitelistedAnimations, animationTrack) then
        -- Handle the player
    end
end

Now I’m not sure how to detect if an animation has loaded, or if it’ll even work but it’s worth giving it a shot

You can use the Animator.AnimationPlayed event to detect when a client (or the server) loads an animation for their character. Check the passed AnimationTrack to see if the correlated Animation object is allowed and simply stop it if it’s not.

1 Like

Here’s how I would bypass this, from the perspective of an exploiter.

hookfunction(animator.GetPlayingAnimationTracks, function()
    return {}
end)
1 Like
for _, connections in pairs(getconnections(Animator.AnimationPlayed)) do
  connections:Disable()
end
local checkingAnim = animator:LoadAnimation(randomAnimation)
local tracks = animator:GetPlayingAnimationTracks
--change checking anim every 2 days or so
--also obfuscate this code
--you can also add more than one
local checkerFound = false
for _, animation in pairs(checkingAnim) do
    if animation == checkerFound then
          checkerFound = true
    end
end
if not checkFound then
--take action
end

Play an checker animation, and If no animationplayed event is fired take action

:cold_face:

  1. You are iterating through checkingAnim, and the :LoadAnimation() function returns an instance, not a table. Did you mean to iterate through tracks?
  2. You are comparing if animation is equal to the bool value. if animation == checkerFound then
  3. You are attempting to do a namecall on GetPlayingAnimationTracks but you are not fully namecalling it in line 2.
  4. --also obfuscate this code Obfuscating it won’t do much.

On top of that, you have players using speed cheats, fly cheats, teleport cheats, jump cheats, etc. :thinking:
For some reason, a lot of players think I know all the “developers” and fill my inbox with request to ask the “insert game dev team” to please use my anti-cheat service. :rofl:

Your anti-cheat service makes pockets on babies clothes seem useful.

1 Like

oops, srry about that

load it prematurely

This is mostly psuedo code

My message inbox on the forum and Roblox Analytics would disagree. :wink: