Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » how do you make a sprite follow your mouse?
- ColtPanther2016
-
1 post
how do you make a sprite follow your mouse?
how do you make a sprite follow your mouse? help?!
- 21lyoja
-
100+ posts
how do you make a sprite follow your mouse?
forever
point towards [mouse-pointer v]
move (4) steps
end
- drmcw
-
1000+ posts
how do you make a sprite follow your mouse?
Be careful with the
point towards [mouse-pointer v]block as It currently has a bug and doesn't work when just dragged into a project. To fix; just re-select mouse-pointer from the block's drop down menu.
- jacquesimo
-
100+ posts
how do you make a sprite follow your mouse?
when green flag clicked
forever
go to [mouse pointer v]
end
Or
when green flag clicked
forever
point towards [mouse pointer v]
move (5) steps //Speed replaces 5
end
p.s. Don't forget this!
when green flag clicked
go to x: (0) y: (0)
- Jagged-tail
-
8 posts
how do you make a sprite follow your mouse?
That points, not goes to.forever
point towards [mouse-pointer v]
move (4) steps
end
this should help:
when green flag clicked
forever
go to [Mouspointer]
end
- asivi
-
1000+ posts
how do you make a sprite follow your mouse?
Please read the original postThat points, not goes to.forever
point towards [mouse-pointer v]
move (4) steps
end
this should help:when green flag clicked
forever
go to [Mouspointer]
end
follow your mouse? help?!how do you make a sprite
- -Spectrum
-
500+ posts
how do you make a sprite follow your mouse?
To make a sprite follow your mouse forever, all you need is a very simple script: how do you make a sprite follow your mouse? help?!
when flag clicked
forever
go to [mouse pointer v]
end
The sprite will act as if it is stuck to your mouse. If you use this script, which many people have been suggesting . . .
when flag clicked
forever
point towards [mouse pointer v]
end
. . . then it won't actually work, at least not for what I think you're trying to do.
You could also replace the ‘go to mouse pointer’ block with this, although there's no point really:
go to x: (mouse x) y: (mouse y)
I hope that helps, this topic has been getting a little confusing with all the answers!

- drmcw
-
1000+ posts
how do you make a sprite follow your mouse?
That's why each person who suggested it has added a move block to the loop so it will work. You just need to be careful of the scratch bug associated with that block and just re-select mouse-pointer from the blocks menu to fix. If you use this script, which many people have been suggesting . . .when flag clicked
forever
point towards [mouse pointer v]
end
. . . then it won't actually work, at least not for what I think you're trying to do.
- Ph0enix3000
-
94 posts
how do you make a sprite follow your mouse?
when green flag clicked
forever
go to [mouse pointer v]
end
or
when green flag clicked
forever
point towards [mouse pointer v]
move (10) steps
end
- moss-shadow
-
500+ posts
how do you make a sprite follow your mouse?
Here's a harder but cooler way:
when green flag clicked
forever
wait (.1) secs
set [x v] to (mouse x)
set [y v] to (mouse y)
end
when green flag clicked
forever
glide (.1) secs to x: (X) y: (Y)
end
- harryhorseharp
-
10 posts
how do you make a sprite follow your mouse?
when green flag clicked
forever
go to [ mouse pointer]
end
- Discussion Forums
- » Help with Scripts
-
» how do you make a sprite follow your mouse?