Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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"

1 comment

0

Try posting the script you tried to use.

2 answers

✓ Accepted answer

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


2 comments

0

Thanks! I sent you a friend request :3

0

Hey, that's great and all, but how do you make it so it shows the player face on SCRIPT COMMAND???

This discussion is preserved as it was. New answers, comments, and votes are closed.