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

How Can I spawn people of random colors?

I has been trying but I dont have the case, Those are the first time I am learing to script.

1 answer

You can do this using a script in ServerScriptService, along with the following: PlayerAdded PlayerAdded will return Player

You can then use Player to find when their character is spawned using CharacterAdded. This will return the player's character.

then use:

for i,v in pairs(character:GetChildren()) do 
if v:IsA("Part") then

end

This will go through every item inside of a player's model and see if it is a part. v stands for what item is being checked. If v passes the test and IS a part, then you can use BrickColor.random() to give the part a random color.

v.BrickColor = BrickColor.random()

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