Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do I randomize this?

Asked by 10 years ago
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.

0
use math.random NinjoOnline 1146 — 10y
0
correct, but how? I mean like in what line do I put math.random? biocommand 30 — 10y

1 answer

Log in to vote
1
Answered by 10 years ago

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!

0
Thanks, I accepted your answer. biocommand 30 — 10y
Ad

Answer this question