I have been busy making a Roblox game.
https://web.roblox.com/games/4451993957/The-Nutcracker
But I can't find out how to make a player randomly say something with their player name and their player picture. SEND HELP!!! I still have NOT figured this out. If someone were to help me they get to friend me :3 (and also you will be sponsored in the game and given credit to. :3)
Thank you for your "TIME"
Like I said in my comment, you should type up the script you tried to use. Anyway, what you do is insert a screengui into StarterGui, insert a frame into the screengui, then insert an imagelabel and a text label into the frame. Then. insert a local script into the imagelabel. The script in the local script.
1 | local maxNumber = -- type in the max number the rng thing can make |
2 |
3 | local number = math.random( 1 ,maxNumber) |
4 | if number = = 1 then |
5 | local player = game.Players:GetPlayers() [ math.random( 1 ,#game.Players:GetPlayers()) ] -- got this line from someone else |
6 | userID = player.UserId |
7 | script.Parent.Parent.TextLabel.Text = player.Name |
8 | script.Parent.Image = "https://web.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&userid=" ..userID |
9 | end |