If part.Name ~= "HumanoidRootPart" and part.Name ~= "Humanoid" thenįor i, newpart in pairs(newcharacter:GetChildren()) doįor i, player in pairs(Players:GetChildren()) do 1= character.LowerTorsoįor i, part in pairs(character:GetChildren())do Repeat wait() until player.Character ~= nil Right now I’m using this script to replace all of the parts: function ReplaceBody(player) Collision between the player and the other invisible player still works, and when the script is run on the player themselves they immediately die and respawn. I’m having some trouble replacing the body parts in the character without that character ending up as a pile of unanchored parts. When it connects locally you can change the appearance of that player’s specific character rather than running the loop for everyone. This means if you decide to add a hat to the Player.Character in that if statement, every currently alive player in the game except for you will have that hat.Īlternatively you can fire an RemoteEvent on CharacterAdded, and pass the Player as a parameter to the remote. In the above code, any changes you make (where the comment is) will be made locally for you. ChangeAppearance.OnClientEvent:Connect(function()įor _, Player in pairs(game.Players:GetPlayers()) do ![]() This way the LocalPlayer sees everyone else as whatever you want them to see, and them as themselves - on their own screen. If the player in the iteration of the loop is not the LocalPlayer you can change their character. When you listen for the event being fired to client side, you can run a loop to get all players in the game. ![]() You can fire a Remote Event from server side to all clients.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |