the prox prompt distance is only the distance that it shows from, im afraid a exploiter could make the proximity prompt visible on their screen and take the cash from far away
if you search “proximity prompt hack roblox” the second result is a script on v3rmillon that remotly fires a proximity prompt, although it might be patched now im not sure
I made a sanity check that checks if the player is close enough to fire the proximity prompt, if anyone else wants to see this script here you go
local part = (the part that contains the proximity prompt)
local distance = 10 --- change to the distance of the proximity prompt
part.ProximityPrompt.Triggered:Connect(function(plr)
local DistanceLimit = (plr:DistanceFromCharacter(part.Position))
if plr.Character.Humanoid.health ~= 0 and distance <= DistanceLimit then --- checks if the player is alive and close enough to interact
--- your proximity prompt action here
end
end)
One thing to note is that the client’s character position is replicated. An exploiter could teleport their character to each proximity prompt and then fire it, and your code wouldn’t pick that up
I know, my point is just that it’s incredibly easy for an exploiter to bypass your current solution. You’re right though, an anti-teleport script would be a great place to start!