What do you want to achieve? Im trying to acheive a Pet system where my pets that are made of 1 part, will attack an npc and rotate around it till the npc dies then the pets will return to the player,
What is the issue? the issue im facing is not knowing how to move the pets from being equipped to the player to attacking the NPC.
What solutions have you tried so far? i have tried using TweenService and lerping but i couldn’t make it work effectively. i have also tried taking the pets current CFrame and moving it to the NPC CFrame and then return it to the previous pet CFrame but as you would guess it wouldn’t be very effective.
how did a game like Pet Simulator 99 do it? where if the player clicks a coin, the pets will smoothly move twords the coin and form a circle around it, then the pets will return to the equipped position when the coin is fully destroyed.
im not asking for code, im just asking for guidance and what services i should be using.
They give you the ability to position and rotate your pets to follow the attacking motion you’re looking for while maintaining the smooth factor; however, it is up to you how you actually use them to make it do that. I’m not exactly sure what Pet Simulator 99 attacking looks like, but this should get you started.
You can also use them to have your pet return to you by having an attachment near your player’s character which serves as said pet’s origin. These constraints work using attachments which can be really helpful since they can almost act as a weld, without having to un-weld and all that stuff, depending on how you use it.
That is an option, yes. You have a lot of freedom with attachments, though I’d recommend using different attachments for different purposes as you said. Attachments inside a part will move with that part kind of like a welded part, so that could be a problem if you try to, for example, reposition an attachment parented to your character’s root to make the pet move, but as soon as your player moves it’ll shift the pet away with you.
If you don’t want this behavior, you can parent attachments to workspace.Terrain which will let you position them freely in the world.