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

How to call random Strings from a Tabel?

Im trying to make the player yell random phrases after touching a object like SCP

heres the line i currently use doesnt work at all this is in a server Script

game.Chat:Chat(player.Character.Head, Strings[math.random(1, #Strings)]

heres the Strings

local Strings = {'HELLO COMRAD!', '????? ????????!', '????? ?????? ?? ??????. ???? - ??? ???!', '???? ?????? ???? ?????????!'}

3 comments

0

Are there any errors in the output?

0

Try: game:GetService("Chat"):Chat(player.Character.Head, Strings[math.random(1, #Strings)]) | Also, you haven't closed your bracket.

0

no there were no errors

1 answer

GetService(_Chat_)_Chat(player.Character.Head, Strings[math.random(1,_

that fixed it

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