Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Prevent Mob from Moving when its on the Mob?

	while script.Parent.Placing.Value == true do
		wait()
		local target = mouse.Target


		if   target or target.Parent or target.Parent.Parent ~= Mob then
			Mob:MoveTo(mouse.Hit.p)		
		end
	end

I am trying to make it so that when the mouse is over the mob it does not move it, because if i dont, the mob will keep gettin closer to the screen

1 answer

✓ Accepted answer

Try this.

while script.Parent.Placing.Value == true do
    wait()
    local target = mouse.Target


    if   target or target.Parent or target.Parent.Parent ~= Mob then
        Mob:MoveTo(mouse.Hit.p)    
	mouse.TargetFilter = Mob 
    end
end

This discussion is preserved as it was. New answers, comments, and votes are closed.