Someone please help!

Hey devs!

How could I make a plane in Roblox that follows the mouse position, I know how to get the mouse position and send it over to the server, my problem is with understanding how to make the plane itself.

Kind of like this:

Any help appreciated!

1 Like

I feel like there is a lack of knowledge of this topic in the dev community, there are little to no tutorials on this stuff, anyone know how to do this?

Does anyone know how to do this?

I’m not sure if you know this, but there are a few things to know about planes in Roblox:

Planes can’t rotate
Planes can’t move (well, they can, but only in a direction).

Here’s what I would do:

Make a baseplate and make sure it is anchored.
Make a model with a plane in it.
Put a script inside that model with a variable called “targetPosition”
Inside the script, have it move toward “targetPosition”
Make another script in the baseplate that has a script in it that updates the “targetPosition” variable.

You can use this script for the model:
local model = script.Parent
local targetPosition = model.Position
local speed = 10

while true do
targetPosition = model.TargetPosition.Value

local direction = (targetPosition - model.Position).Unit
local distance = (targetPosition - model.Position).Magnitude

if distance > 1 then
    model:Move(direction * speed)


And this script for the baseplate:
local target = workspace.Model

while true do
target.TargetPosition.Value = game.Players.LocalPlayer:GetMouse().Hit.p