Hi, I am trying to make a pandoras box in roblox but I am stuck at the scripting part I don't know what to do So my question is that if can anyone here help out with the script?. If so that will be greatly appreciated
COMMUNITY QUESTION
How would I make a Pandora's Box?
1 answer
This would work in a similar way in choosing any card from a deck of cards randomly. You can implement this idea to do different things.
function getRandomCard()
local number = math.random(13)
local suit = math.random(4)
local card = ""
if number >= 1 and number <= 9 then card = number + 1
elseif number == 10 then card = "Jack"
elseif number == 11 then card = "Queen"
elseif number == 12 then card = "King"
elseif number == 13 then card = "Ace"
else card = "?" end
card = card .. " of "
if suit == 1 then card = card .. "Hearts"
elseif suit == 2 then card = card .. "Diamonds"
elseif suit == 3 then card = card .. "Clubs"
elseif suit == 4 then card = card .. "Spades"
else card = card .. "?" end
return card
end
Source From Roblox Wiki
1 comment
0
Hi benj Can you just explain this in more simpler terms, Thanks!
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
What don't you know how to do? The entire scripting part? And if this is a request, it should not be asked here.