Here’s an example of how you can create a button for each face in the table and set its name to the corresponding FaceID.
local faces = {
["SuperSuperHappyFace"] = {
FaceID = 494290547,
},
-- add more faces here
}
local player = game:GetService("Players").LocalPlayer
local screenGui = player:WaitForChild("PlayerGui"):WaitForChild("ScreenGui")
local frame = Instance.new("Frame") -- create a new frame to hold the buttons
frame.Parent = screenGui
for faceName, faceInfo in pairs(faces) do
local button = Instance.new("TextButton") -- create a new button
button.Name = tostring(faceInfo.FaceID) -- set the button's name to the FaceID
button.Text = faceName -- set the button's text to the face's name
button.Parent = frame -- parent the button to the frame
end
This script will create a new button for each face in the faces table, set its name to the FaceID, and its text to the face’s name. The buttons will be parented to a new frame in the player’s ScreenGui. You can customize the appearance and functionality of the buttons as preferred.