This may be more difficult than it sounds. Let's assume a user creates a part through a global script. Is there a way to make that part move in the direction of that user's mouse.Hit.p until the part no longer exists? I have been trying many things, but here is my latest attempt. If anyone knows how to do this, I would be extremely grateful! Thanks in advance.
In a local script within the part that was created...
player = game.Players.LocalPlayer
while wait(.01) do
if script.Parent ~= nil then
local mouse = player:GetMouse()
local position = mouse.Hit.p
script.Parent.Velocity = CFrame.new(script.Parent.Position, position) * 70
end
end

2 comments
I dont think you can use a CFrame for Part.Velocity. According to the Wiki at least, it takes a Vector3. In that case, I would just do Part.Velocity = Mouse.Hit.Position.
I initially had .LookVector appended to the end on line 6 after the parentheses. That didn't work either.