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
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