Moving Player to Part

Hello all,

I am currently working on a system to where If a player is in a certain area, they will get abducted by a UFO.

Images for refrence


So far, I have the script for detecting their location, but im lost on how to move them to the UFO

local part = game.Workspace.UFO
while true do 
    wait()
	local MagnitudeBetweenPlayerAndPart = (Part, Player.Part).Magnitude -- gives distance between "part" and a part of the player
	if MagnitudeBetweenPlayerAndPart < 10 then
		print("the character is less than 10 studs away from the UFO")
	end
end

How would I make the character move to the UFO? I feel like it would either be Body Positon, Tweening, but just teleporting it with CFrame doesn’t achieve the affect I am aiming for, as it just teleports them there, not MOVE them to it

so you want the player to teleport to the UFO not move?

Other way around, I feel like tweening them to it would work, but im not sure if Body Position or anything is a more clean and optimal look

Tween is good for that, u can use it

Alright, ill give it a shot

Just tweening their HumanoidRootPart would work, correct? (torso for r6)

Yes humanoidrootpart would work it’s the primarypart

1 Like

You can also use RocketPropulsion | Roblox Creator Documentation

1 Like

tweening is the way to go if the ufo is static and not moving, otherwise i’d use lerp in a for loop or bodyposition

1 Like

Now, this worked good, but I have to jump in order for the player to move to the UFO using RocketProplusion

You should only use tweening on a player character if they are anchored and the target object you are moving to does not move also, as it is hard to update the tween goal after you start playing it. The reason why the player should be anchored is that otherwise, they will be fighting with gravity and the physics engine, and probably cause strange things to happen.

You should use a body mover or a physics constraint to move them in most cases. Likely BodyPosition+BodyGyro or AlignPosition+AlignOrientation