Hello! I was hoping someone could help me out with a feature I am working on in my game. I have no idea where to start so any information will help. I am looking to create a quick cutscene that the camera switches to for just couple of seconds. I wanted to show the players who are in game and their avatars featured in the area of the cutscene. I have everything working, only part I need help with is the players. How do I make it so that the people in that server have their avatars appearances loaded on the screen doing an animation. The server is 4 players max and I positioned four rigs around the scene, each with a corresponding animation. So how do I (depending how many players are in the server) load their characters in to fill the spots and make them play an animation. I want the empty spots to have nothing but they are filled with players when enough are in the server. I hope this makes sense. Any ideas on information on how to make this possible would help. Thank you so much!!
The players’ Humanoid
s will have something inside them called a HumanoidDescription. You can copy their HumanoidDescription and apply them to the Dummy’s Humanoid
.
You can easily Clone the Avatars and Place them where the Dummies are,
Like what @MegabyteOfficial said, you can just use HumanoidDescription
, but it has some downsides as it doesn’t properly weld the Accessories, It would be much easier to just clone them.
I can do that, however, how do I know how many players are in the game and then assign each clone to a certain Dummies position.
use a for loop, and use #
to count the number of Items in a table or string, for example:
print(#game.Players:GetPlayers()) -- if there is one player, will print "1"
My script does that already, but once I have the number like 1,3,4, how do I get their character and position them to separate Dummies.
You can Name the Dummies to something like 1,2,3,4
and search through them within a for loop:
Example[i] -- depending on the iterating, it will determine what Dummy it is