How can I get a random position starting from the player's mouse?

Hello, I have been working on a confetti effect when that starts from the player’s mouse when they click a button, But I am having some problems with it:


It keeps on going in the opposite direction of the button.
Here is my code that chooses the random position:

image:TweenPosition(UDim2.new(R:NextNumber(0,1),0,R:NextNumber(0,1),0),'Out', 'Sine', 5)

How can I choose a random position starting from the mouseN
Thank you!

Maybe because you’re ranging from 0 - 1 and not -1 - 1:

Change both to R:NextNumber(-1, 1).


It still has the same problem, what I was thinking about is get a random position starting from the mouse position.

Edit: I tried using offset with the mouse.X and mouse.Y and adding a math.random() but It still seems to do the same thing.