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

How would I make a part follow your mouses position?

1 answer

✓ Accepted answer

put this in a LocalScript;

local player = game.Players.LocalPlayer --gets the player
local mouse = player:GetMouse(); --gets the player's mouse
local part_to_move = .. --the part to move


mouse.Move:Connect(function() 
	part_to_move .Position = mouse.Hit.p;
end)

4 comments

0

Wouldn't that only be visible to the player doing it?

0

Nvm thanks!

0

But how would I set a limit to how far it can go and how would I make it so it doesn't dissapear when I point my mouse at the sky?

0

you can add if statements to to check and limit how far the part can go

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