So basically i want to prevent exploiters from activating, aka “Healing” themselves in any position on the map
And i don’t know if this will help:
-- / VARIABLES /
local MainPart = script.Parent.Parent
-- / VARIABLES /
MainPart.Touched:Connect(function(Hit)
local DistanceCheck = (MainPart.Position - Hit.Position).Magnitude
if DistanceCheck < 5 then
warn("Verified the distance!")
else
warn("Didn't verify the distance, possible exploiter")
end
end)
Yes, in theory, but no. Exploiters can simply teleport to the part if they really wanted to get healed. Yes, they can’t activate the touch interest from a long distance to heal, but they can teleport there and back to get the healing.
Make sure you’re verifying where the player should be. Just checking if a player has teleported isn’t good enough as they’ll interact with the touch part faster than that.