so im making a game based off a game show called the death pit where you answer questions and if you dont answer them correctly you will fall into a pit. im trying to make it so its picks a random platform then asks a random question. can someone help?
local random = math.random(1, 3)
local qtable = {}
qtable[1] = "How do you say Apple in spanish"
qtable[2] = "In the rubiks cube wca, What shape is the megaminx"
qtable[3] = "What's Ikon's most liked song"
game.ReplicatedStorage.starting.OnClientEvent:Connect(function(player)
print("Client Fired")
wait(10)
if random == 1 then
script.Parent.Text = "Platform 1, "..qtable(math.random(1,3)).."?"
script.Parent.Platform.Value = 1
if random == 2 then
script.Parent.Text = "Platform 2, "..qtable(math.random(1,3)).."?"
script.Parent.Platform.Value = 2
if random == 3 then
script.Parent.Text = "Platform 3, "..qtable(math.random(1,3)).."?"
script.Parent.Platform.Value = 3
end
end
end
end)

3 comments
can you right the script? i think i did what you were saying incorrectly because it didnt work
write
I've edited it to include an example script