How do I create a magnetic resitance effect?

How do I create a magnetic resitance effect, so that when I walk near the prop it will try to move away from me. As if I we have the same polarity… if you know what I mean.

Is there an easy way to make this script? Has it been done before? If so where?


[editline]21st November 2010[/editline]

Does nobody know? :frowning:

local radius = 200
local force = 100

for k,v in pairs(ents.FindinSphere(ply:GetPos(),radius)) do

local dist = v:GetPos():Distance(ply:GetPos())



Something like that.

thanks :slight_smile: