I'm trying to make the Script change the name of a Part to one of the randomly selective name in the Table.
myTable = {"Bob","Mike" ,"Jack"}--Here my table part = script.Parent while true do wait(1) part.Name = myTable[math.random(1,#myTable)]--Here where I want my part name to change to random name of the table. end
I just started to learn Scripting and I'm currently playing around with Math.random but I'm having some trouble on how to use Math.Random. All answer are appreciated! :)
V is a nil value. Get rid of it.
myTable = {"Bob","Mike" ,"Jack"}--Here my table part = script.Parent while true do wait(1) part.Name = myTable[math.random(1,#myTable)]--Here where I want my part name to change to random name of the table. end
Works in my studio.