Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you make a text go from a text to a random player?

Asked by 5 years ago
Edited 5 years ago

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"

0
Try posting the script you tried to use. niroqeo 123 — 5y

2 answers

Log in to vote
0
Answered by
niroqeo 123
5 years ago
Edited 5 years ago

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.

local maxNumber =  -- type in the max number the rng thing can make

local number = math.random(1,maxNumber)
if number == 1 then
    local player = game.Players:GetPlayers()[math.random(1,#game.Players:GetPlayers())] -- got this line from someone else
    userID = player.UserId
    script.Parent.Parent.TextLabel.Text = player.Name
    script.Parent.Image = "https://web.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&userid="..userID
end


0
Thanks! I sent you a friend request :3 Cyber_gamer91 -3 — 5y
0
Hey, that's great and all, but how do you make it so it shows the player face on SCRIPT *COMMAND*??? Cyber_gamer91 -3 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

NIROTURTLE IS THE ANSWER TO EVERYTHING

Answer this question