:Kick(math.random) not outputting key messages in table

  1. What do you want to achieve? Pick random message to put in Kick:()

  2. What is the issue? Instead of a random message appearing a number appears instead.

  3. What solutions have you tried so far? used Random.new and got
    Unable to cast value to std::string error instead.

Here is my script.

local kickmsgs = {"Bye; bland i know.","YOU DID WHAT?", "connor-get-out-wwe-tenor-gif"}
player:Kick(math.random(1,#kickmsgs))

Here is an image preview of the kick message i received:
image

You are kicking with the index, not the value in the array.

player:Kick(kickmsgs[math.random(1,#kickmsgs)])
local kickmsgs = {"Bye; bland i know.","YOU DID WHAT?", "connor-get-out-wwe-tenor-gif"}
player:Kick(kickmsgs[math.random(1,#kickmsgs)])
1 Like