Hello,
I am trying to make a function that randomizes players appearance when called. How would I go about doing this, my first thought would to use randomized player.userId's in the place of this:
game.Players.PlayerAdded:connect(function(Player) Player.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=math.random(16, 145599999" end)
If your wondering where I got my math.random numbers, I recently calculated the Roblox population as of 7/22/16 around 11 there were 145599999 players registered to Roblox. anything below 16 could give an error because there are missing player slots for 6,7,8,9,10 etc...
I got the above function to work, but when I turn it into a callable function, and try to call it, it doesn't work. I also noticed that the above function only works when the player joins the game and not if they respawn.
So how can I randomize a character's appearance with a callable function. We don't need to use the method above, if there is an easier or more clean way I'd rather go with that. So whats going on, how can I do this?
Thanks in advance,
--Deka
Well, the best way to do this is:
local appearance = math.random(16, 145599999) game.Players.PlayerAdded:connect(function(Player) Player.CharacterAppearance = "http://assetgame.roblox.com/Asset/CharacterFetch.ashx?userId="..appearance.."&placeId=YOURPLACEID" end)
I dont really recommend doing this though, unless you really want to. Cause most id's are the "newest player" id.