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!
I asked for help on the ROBLOX Forums and they ended up with this. Script that didn't work:
local ContentProvider = game:GetService("ContentProvider")
repeat wait() until game.Players.LocalPlayer.Character ~= nil
repeat wait() until (ContentProvider.RequestQueueSize == 0)
local Plr = game.Players.LocalPlayer
local Char = game.Players.LocalPlayer.Character
while true do
wait(0.1)
if script.Parent.Humanoid ~= nil then
if script.Parent.Humanoid.Health ==1 then
local ChangeFace = true
local FaceId = {574701104, 574701264, 574701296, 574701328, 574701359, 574701387, 574701414, 574701431, 574701479, 574701532}
wait(0.5)
if ChangeFace then
local var = FaceId[math.random(1,10)]'FaceId'
Char:WaitForChild("Head").face.Texture = ("http://www.roblox.com/asset/?id=" .. var)
end
wait(0.1)
script:remove()
end
end
end

2 comments
This is over complicating a very simple thing.
Whoever decided to downvote me, boo you. You must not know a thing about how to use math.random(). As I was saying, line 17, remove 'FaceId' at the end. That's just a bug.