Parts move with the player

I’m decently new to roblox game creating and scripting in general so i’d like a bit of help on how to do this

What i want to achieve is similar to this but i want it to also follow the direction your player is facing:

what i have right now:

External Media

uploading the file normally led into an error that’s why i had to do this

CFrames can be used to achieve this. I recommend reading up on CFrames since they’re quite helpful. In this case, you can use the following code below to position the sphere behind the character no matter the direction they’re facing. Of course, you’d want to update the values continuously when you implement it into your game.

-- followPart is the sphere; character is the character model
followPart.CFrame = character:GetPivot() * CFrame.new(0, 0, -5)

so the last cframe would be the offset away from the character right?

edit: after testing this it seemed to cause way to much lag in the server side and some things didn’t work anymore properly

not needed anymore since i just did it a different way

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.