Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

This may be specific but...?

How do i make a script that makes some sort of pet that has a never ending loop animation while following you around, and kill anything in the way BUT you. I'm trying to make a flying angel that will kill any enemies or friends, or maybe some sort of white list built it. I'm not the best a scripting so if someone could give me some tips or something that would help, thanks.

                            -Mark

2 comments

0

I'm just going to say this first to other people looking at this. He just wants tips on how to do this, not begging for a script.

0

And I am not the best in this certain topic, but I would throw in that you should make classes for the players and enemies. Then, when the pet needs to check if it has the right target, it can refer to those classes (I would use values for that) to see whether it should attack.

1 answer

Use an infinite loop

Wait a second between each iteration

Find your player model

Find the torso of your player

Set the position of the pet to be some offset position away from your torso

To improve on this, use BodyPosition or one of the Body... objects

This discussion is preserved as it was. New answers, comments, and votes are closed.