hey everyone, i think these animation events can be exploitable since exploiters could turn looped on and adjust the speed of animation tracks? Ive been stuck at this problem
-- imagine the remote events are in animation events
animTrack:GetMarkerReachedSignal("Atk1"):Connect(function()
print("swoooshhh")
end)
animTrack:GetMarkerReachedSignal("Atk2"):Connect(function()
print("booshh")
end)
animTrack:GetMarkerReachedSignal("Atk3"):Connect(function()
print("Wabb Pam")
end)
I have to find a solution to validate player on serverscript or should i not use these animation events?
What you should do is on the client detect these markers, send a signal to the server, and on the server it will first check if there is a cooldown. Everytime the player attacks, add a cooldown like whatever cooldown the attack is. And if the server gets a signal when the cooldown is on, then do not allow the user to damage others.
Animation markers are really best kept to client-side stuff like sounds/vfx, don’t trust them for anything gameplay related. exploiters can just mess with the animation speed or fire the marker signal whenever they want, so the server has no way to know if it’s legit
safest bet: just fire the remote when they press attack, then let the server handle cooldown + player state + distance checks on its own. doesn’t matter what they do to the animation client side at that point since the server’s making the call independently anyway