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

Change Face on Death?

I'm currently developing a group place but I have no idea on how to generate random faces (or decals). I have around 10 custom made faces I made specifically for that reason. I only know how to script a single face that appears on death... Can anyone help? Thanks!

1 answer

Using math.random, you'd randomly pick a value from the ids in a table. Here's an example:

local tab = {1,2,3,4,5}

print(tab[math.random(#tab)])

It'll print one of the random numbers in that table. You can change it up to change the face decal's id to one of your random ones.

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