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!
Using math.random, you'd randomly pick a value from the ids in a table. Here's an example:
1 | local tab = { 1 , 2 , 3 , 4 , 5 } |
2 |
3 | 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.