How to get a smooth draggable object using a drag detector that cant be exploited?

i want to have a ragdolled dummy with a drag detector (which i have already made) but one that still looks smooth for all clients, but cant be teleported outside the map by an exploiter, or any other alterations. for now the dummy is draggable, but i could in theory drag it outside the map with exploits (deleting map parts and dragging it outside, maxtranslate setting in drag detector isnt helping) and smooth ragdoll body parts for all clients. any ideas on how i could achieve these?

4 Likes

You could verify the position of the dummy in intervals on the server, and also reset it’s model if any of it’s children go missing.

3 Likes

and how about keeping it inside the map? what if the map isnt just a big square shape?

3 Likes

Good question. I think you could try getting the vector to the nearest wall, and if that vector’s end position is closer to the centre of the map than it’s start position, you can assume it’s outside the map.

3 Likes

Implement checks on the server to ensure that the dummy’s new position after dragging remains within the bounds of the map; if it falls outside these bounds, reset the dummy to a valid position.

1 Like

do you think i could achieve this with something like multiple base parts and using get parts in part to check the dummy is at least in one room of the map? and if not, either move it to one or create a new dummy?

1 Like

in intervals, for example every few seconds?

1 Like

Using the map’s position to define boundaries would be more efficient for checking the dummy’s position against the unwanted areas, and it would also ensure consistency and performance, even if those boundaries are altered or deleted.

but the checks would be server sided, i dont think itll create a problem, no?

You want to be as efficient as possible, especially when working with the server, since it’s going to have limited resources, and has to manage everything.

1 Like

so using base parts instead of positions is inneficient? i just realized a said i would make it like a while loop, but dragEnd would work as well. i also questioned that way because i dont really understand how i am supposed to use the maps positions, as the map isnt a regular shape, and doesnt have only 4 walls…
i thought using something like the ZonePlus module on dragEnd (by sending a remote to the server) would be a good way to do it but i cant script that to test it right now…

1 Like

Using the map’s position for boundary checks is better for performance because it reduces the number of calculations needed compared to checking against multiple individual parts.

and i said i have absolutely no idea how to do that, can you elaborate?

By using Vector3 values, which consist of three components: X, Y, Z. These components specify the position of an object in a 3D coordinate system.

For example, if you create a part in your game and place it on a baseplate at a specific location, you can access its position property to retrieve its Vector3 value. This value will provide you with the coordinates (X, Y, Z) of the part’s position relative to the game.

I KNOW WHAT A VECTOR 3 IS. What i dont know is, what do you mean when you say

the map is not square shaped, and instead is just a flying room house thingy, similar to one of a home interior,. with living room, bathroom, kitchen etc. what position are you talking about? i already mentioned all these aspects…