[UNSOLVED] How to make an object fly to the position of the mouse?

Hey, pretty much the title.
Now before I continue, I will say this is what my current one looks like, and the problems it’s facing:

I’m looking for an entire new method to do so than the one within that topic I posted above (code included there)

Thanks in advanced!

3 Likes

Well, I would just do this.

local dir = (CenterPart.Position - mouse.Hit.p).Unit
BodyForcre.Force = Vector3.new(dir.X,Weight,dir,Z) * Speed

Replace CenterPart with the main part of the model

1 Like

local script

function remotefunction.OnClientInvoke()
	return Mouse.Hit.p
end

server script

while wait() do
   local mouseposition = remotefunction:InvokeClient(Player)
   part.Position = mouseposition
end
1 Like

Hey, wouldn’t work as what I’m trying to achieve is flying (see the topic link posted for video ref)

1 Like

Hey, I tried it out and it just seems to sit on the floor whenever I do it

ok so ignore my last post. i seriously dont know how your position align managed to be 90 degrees offset. did you tried to rotate your attachment yet? or swapping part0 and part1

Yeah, the thing is that it actually flies properly for a bit before it ends up turning like that.
I’ve tried swapping part0 and part1, but ends up not working at all that way.
Here’s a video of it flying properly, but after awhile of flying it messes up:

1 Like

UPDATE:

I believe it’s something to do with the fact it’s using the roblox physics to move it? And desyncs after awhile. If there’s no real way to fix it, I just need another way to make it follow the mouse smoothly.

UPDATE #2: I believe also it has something to do with the attachment, which I figured out rotates itself, however, even while forcing the attachment to stay it doesn’t really do anything.

Still looking for a different method to make this thing fly.

1 Like