function Create(self) --self.parent = MovableMan:GetMOFromID(SceneMan:CastMORay(self.Pos, Vector(-50 * self.Vel.X, -50 * self.Vel.Y), 0, 0, false, 3)); --self.parent = MovableMan:GetMOFromID(self.parent.RootID); self.parent = nil; --Find out who shot the weapon by finding the closest actor within 50 pixels. local curdist = 500; for actor in MovableMan.Actors do local avgx = actor.Pos.X - self.Pos.X; local avgy = actor.Pos.Y - self.Pos.Y; local dist = math.sqrt(avgx ^ 2 + avgy ^ 2); if dist < curdist then curdist = dist; self.parent = actor; end end if MovableMan:IsActor(self.parent) then print("" .. self.parent.Scale .. ", classname " .. self.parent.ClassName); if not (self.parent.Scale == 1.01) then self.parent.Scale = 1.01; else self.parent.Scale = 1.0; end else print("MOID " .. self.parent.ID .. " is not an actor"); end end