How would anti - fling work?

So, im just wondering, how would you create some sort of anti fling? All the methods ive thought of were all clientsided which would be useless. Does anyone have any idea on how to do this on the server?

2 Likes

What do you mean by anti-fling? Please be more specififc

1 Like

As far as I know, on the server (preferably) or maybe the client, you can check the position or “the distance moved per x amount of time”. I’ve heard of people checking character velocity as well.

If it exceeds, then you know the player is either teleporting or fling. But with velocity, you know it’s fling.

Or it’s simply a glitch/bug, you can never know

what if my game has some form of velocity changing/speed up? This doesnt seem effective

1 Like

true, but on client, you can do task.wait (or a special type of wait) that give an exception for insane ping

yes, so say if a user is walking (not in a car race) then you give it a range, and another range for car race, etc.

edit: the ideal concept is to apply restrictions enough to prevent hacks, but can still have some buffer

1 Like

That’s also true, but if you also have changing speeds then…

1 Like

have your fling set to some sort of function of your current highest possible speed, like if you go 10x over your current walkspeed/car speed/flying speed, then it would know you probably got flung or did a tp

1 Like

flinging isn’t possible when characters can’t collide with each other, this could be helpful possibly (i just found it online quickly)

Since Velocity property replicates from client to server you can just check user’s velocity and if its too high, temporary remove network ownership, if it continues, kick the player. You can implement a check for position changes and compare that to velocity so people wont get kicked for no reason after going too fast.

1 Like

You can make the servers player character non collidable then update the local players torso and head to be collidable in a loop inside the client. This is the method I use for my anti-fling scripts and it allows for proper collision.