How would I make a race system where it chooses a race for you in rouge lineage

im really new to scripting but i would like to know how to make a race system everytime a new player joins the game like they never played it they get a race I mades 3 races already and I would like to know how to script them so when I join it puts me as a race (not care race like skintone race or ethnic but like rouge lineage)

local Players = game:GetService("")

local races = {"Potato man", "Cheese eaters"}

Player.PlayerAdded:Connect(function(player)
    local chosenRace = races[1,#races] 
    print(player.Name.." has the: "..choseRace.." race!!"
end)
3 Likes

you cant choose races it has to give the player a random one.

That’s what it is doing… Once a player joins the game it will print out which race they’ve recieved.

1 Like

O, I’m so sorry i’m really new to scripting please forgive me.
By the way where would I put the script and how would I add raritys.

This post is really asking for a lot. You’re asking how to detect player data, how to configure that data for each player, how to make it so that it effects the player by how they look like and what abilities they have (like in Rogue Lineage), essentially how to do everything.

Scripting Support is not for people to spoon-feed you code for free. It’s meant to help programmers with their already-existing code, or to help inspire new ideas for soon-to-be code that requires a think-tank.

You’re essentially asking for the entire code to be done for you, but that isn’t going to happen here. Here are some things for you to research if you want some ideas.

https://developer.roblox.com/en-us/api-reference/lua-docs/math

Some things to note: If you’re new to coding, then starting off with something as complex as Rogue Lineage scripts isn’t the way to go. You want to start off small and simple and work your way up to become better. You can’t shoot for the stars immediately, you have to train and learn from bottom to top. You can’t expect to write your own game code immediately as a beginner, you must start off small first.

3 Likes

There are a few ways;

  1. Using another system (easier).
  2. Adding the same race twice in the table.
local races = {"Potato man", "Cheese eaters", "Cheese eaters"}
1 Like