Sorry to bug you guys with out any script or guidelines, but this is the general idea. Get the nearest enemy(10 studs?) and do damage to them. Maybe rotate to face them to? Thanks for all your guys help on my last question.
local rx = enemy:getloc(x) -- pseudo code local ry = enemy:getloc(y) -- pseudo code local mx = script.Parent:getloc(x) -- pseudo code local my = script.Parent:getloc(y) -- pseudo code local mathx = rx - mx local mathy = ry - my local aim = math.atan(mathy / mathx) --cframe stuff --damage stuff
Would this be sorf of aiming?