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

how do I randomize this?

game.Players.PlayerAdded:connect(function(Player)
    Player.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=1315" 
end)

can someone please help me with the code above? I already searched on the wiki how to make a function that randomizes things, but it didn't work, what I am trying to do is that the code above chooses 1 character appearance and gives it to the character that joins, I know that in the script theres only one, but if I put another appearance it doesn't works.

2 comments

0

use math.random

0

correct, but how? I mean like in what line do I put math.random?

1 answer

✓ Accepted answer

This might get some newbies, but you would use math.random. You can edit the script to any of your liking. You can learn more about math.random in the link below.

http://wiki.roblox.com/index.php?title=Random_numbers

game.Players.PlayerAdded:connect(function(Player)
local RandomID = math.random(10000,60000)
Player.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId="..RandomID
end)

Don't forget to mark this as the answer!

1 comment

0

Thanks, I accepted your answer.

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