Need help with script

Hey there.
I am a beginner at scripting. Can someone point me in the right direction to creating something like a sphere or part that will move towards you when you get too close and if you are too far it it won’t follow you.
Thanks.

if character.humanoidrootpart.magnitude <20 then
    part.cframe = humanoidrootpart.cframe
end

something like that, to create a smooth effect you will need to use tweensevice

sources:

2 Likes