I’m working on a card pack opening system in Roblox Studio inspired by Grow a Garden’s seed pack mechanics. Right now, I’ve set it up so that when a player buys the CommonPack Tool from the shop and clicks the air while holding it, the pack disappears just like in Grow a Garden.
From here, I want to add the next steps:
Show a sliding animation like gag while the pack is “opening”
Randomly select and display 1 of 10 possible cards
Make the whole process feel polished and engaging, combining UI animations, random reward generation, and card visualization
I’m looking for advice or examples on how to create these animations and handle the card selection and display effectively in Roblox Studio. If anyone wants, I can also share the script I’m currently using for the pack opening interaction.
Any help, tips, or script samples would be greatly appreciated!
heres a function for weighted random so you can select among seeds with some certain probability
function module.weightedRandom<T>(t : {{T|number}}, random : number?) : T
random = random or math.random()
local totalWeight = 0
for _, block in ipairs(t) do
totalWeight += block[2] :: number
end
local random = random * totalWeight
local sum = 0
for _, block in ipairs(t) do
sum += block[2] :: number
if random <= sum then
return block[1]
end
end
warn(t, totalWeight)
error("weighted random failed")
end
--example use
local seeds = {
{"common", 100}
{"rare", 30}
{"epic", 5}
}
local randomSeed = module.weightedRandom(seeds)
not really something you can give tips for, just spend lots of time polishing it if you want it to look good. Try animating your UI elements and maybe use stuff like 2d particles or flipbooks