I am wondering how to make a system that allows you to use spins to spin for a new family. some would have different buffs and rarities. How would I make a system like this as well as making it give you a random first name?
use the magical and time saving property called math.random
to answer your random name question, i’d put a list of first names and last names in tables, and use random numbers to select a name and a last name randomly.
For your bloodline system, honestly that sounds complicated, you should elaborate more on what exactly you want out of this system
So far, I have it so it will select a bloodline. I also have a script that contains a player’s data which has the bloodline data in it. What should I do next to make it so the player who clicks a button on their gui will have their bloodline changed?
Here is the script that selects a blood line, it’s not connected to a GUI yet.
bloodlines = {"1","2","3","4","5"} -- Bloodlines
for i = 1,10 do
bl = math.random(1,#bloodlines)
wait(0.5) -- time it takes to show the players bloodline
--here it will change the players bloodline
end
and here is the stat script incase
game.Players.PlayerAdded:Connect(function(player)
local data = Instance.new("Folder")
data.Name = "Data"
data.Parent = player
local Strength = Instance.new("IntValue")
Strength.Name = "Strength"
Strength.Value = 0
Strength.Parent = data
local lastname = Instance.new("StringValue")
lastname.Name = "Bloodline"
lastname.Value = "Default"
lastname.Parent = data
--the rest of the stats will be added soon
end)
Why are you putting it in a for loop? Im not entirely sure how spin systems work so correct me if im wrong.
if you want the bloodline to be random, you could do something like
bloodlines = {content_inside_table}
local randomBL = math.random(1, #bloodlines)
plr.Data.Bloodline.Value = bloodlines[randomBL]
ah thank you! and it will loop to give a sort of spin effect, it’ll keep on changing text on a gui and then it will give you your final bloodline ^^