There isn’t enought colors!

And how do I make it so to use and intValue instead of Colors because I wanna make something like 500 level obby

2 Likes

Simply, you can create a leaderstats folder using a PlayerAdded event which would hold all of your Value Objects that you want to keep inside (Preferably the Stage Value for the Obby)

game.Players.PlayerAdded:Connect(function(Player)
    local leaderstats = Instance.new("Folder")
    leaderstats.Name = "leaderstats" 
    leaderstats.Parent = Player

    local Stage = Instance.new("IntValue")
    Stage.Name = "Stage"
    Stage.Parent = leaderstats
end)

This would set up the default leaderboard ROBLOX provides for us :wink: Keeping in mind that we could set our Stage variable as much as we wanted (500, 100M, etc)

2 Likes

Oh yeah should’ve thought of that

1 Like

Thank you for your help I appreciate it

1 Like

But when someone steps on the check point how do I make it the normal spawn location because the script you made is only affecting the changes to the leader stats

1 Like

You could detect if that Player is on a Stage value that’s lower than what the previous stage could be using a Touched event

A more easier way to reference the spawns would be to name them properly in relevance to their current stage (1, 50, 150)

local Part = script.Parent
local Stage = Part.Name --Say we wanted to name this "5"

local function IncreaseStage(Hit)
    local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
    --This current stage the Player is on, is 4 & this would also account for if the Player is behind at all

    if Player and Player.leaderstats.Stage.Value < tonumber(Stage) then --Converting a string into a number value 
        Player.leaderstats.Stage.Value = tonumber(Stage)
    end
end)

Part.Touched:Connect(IncreaseStage)
2 Likes

Ok thx didn’t solve all my problem but I got an idea thx

1 Like

I forgot to connect the function :man_facepalming:

Try again please lol

1 Like

you can use all RBG values. 16 581 375, teams in total. not just the color pallet plate.

Wait really I can do that that would be much easier

No you can’t, TeamColor is locked to just BrickColor value options. I don’t know why it forces BrickColor only, in itself BrickColor is an outdated and useless feature and I’m really hoping it gets deprecated and replaced with Color3.

Oh. I was wrong . I don’t really have a solution then.

You don’t have to make a team for every checkpoint, you could just create a leaderstat to keep track of that.

1 Like

But then how can i assign each number his own spawn location and set it as the default spawn location if the player dies thats the problem im having

everyone thanks for your help but i think i found a solution: How to create an obby, Part 1: Checkpoints system and lava bricks

is there a way to use rgb instead (16 million+ colors i believe) instead or is that a bad practice

Not really, although I am questioning this specific issue as well

The API does say that you can construct a BrickColor() value using RGB, but it’ll only detect the closest color code provided via this link I’d assume

2 Likes

hmm why dont they let us use all the color with rgb or hex code

Just because there is 16 million possible colors with RGB doesn’t mean you should use all of them. Most of the colors have such a small difference you can’t even see.

My assumption is that it’d be way much of a struggle & huge issue when comparing Color3 values

It shouldn’t be too much of an issue provided the amount of BrickColor codes we already have (Which is like over 250 or something)