#I am learning code but need help!

1 messages · Page 1 of 1 (latest)

solemn halo
#

I have been working a lot to make a game that has several teams and seperate ranks in each team. It would kind of be like SCP:RP or something alike.

In this case, it is for a Military RP. I need at least four teams and the possibility to create more teams with their own ranks in the future!

I have heard a lot about using IntValues, but I cannot seem to figure out what that means. Any help is very appreciated!
-# (If you are someone who make these codes for free, please do contact me and I we can talk!)

Here are my most successful scripts so far:

leaderstats (ranks and required XP) script:

game.Players.PlayerAdded:Connect(function(player)
    local leaderstats = Instance.new("Folder", player)
    leaderstats.Name = "leaderstats"
    
    local Rank = Instance.new("StringValue", leaderstats)
    Rank.Name = "Rank"
    Rank.Value = "PVT"
    
    local level = Instance.new("IntValue", Rank)
    level.Name = "Level"
    level.Value = 1
    
    local exp = Instance.new("IntValue", player)
    exp.Name = "Exp"
    exp.Value = 0
    
    local requiredEXP = Instance.new("IntValue", player)
    requiredEXP.Name = "requiredExp"
    requiredEXP.Value = 1000
    
    exp.Changed:Connect(function()
        if exp.Value >= requiredEXP.Value then
            if level.Value < 10 then
                exp.Value = exp.Value - requiredEXP.Value
                level.Value = level.Value + 1
                if level.Value == 2 then 
                    Rank.Value = "PFC"
                    requiredEXP.Value = 2500
                elseif level.Value == 3 then 
                    Rank.Value = "SPC"
                    requiredEXP.Value = 4500
                elseif level.Value == 4 then
                    Rank.Value = "CPL"
                    requiredEXP.Value = 7000
                elseif level.Value == 5 then
                    Rank.Value = "SGT"
                    requiredEXP.Value = 10000
                elseif level.Value == 6 then
                    Rank.Value = "SFC"
                    requiredEXP.Value = 13500
                elseif level.Value == 7 then
                    Rank.Value = "MSG"
                    requiredEXP.Value = 17500
                elseif level.Value == 8 then
                    Rank.Value = "FSG"
                    requiredEXP.Value = 22000
                elseif level.Value == 9 then
                    Rank.Value = "SGM"
                    requiredEXP.Value = 27000
                elseif level.Value == 10 then
                    Rank.Value = "CSM"
                end
            end
        end
    end)
end)

With this script I also added a few "buttons" that gave XP when walked on.

What I need, however, is a script that gives XP over time instead of after an action has been made - like walking on an object.

brisk bay
#

IntValues are just a way to store a number (specifically integers) onto an instance that is accessible through the workspace or whereever that instance is

solemn halo
#

Do you know anywhere I can do that?

solemn halo
brisk bay
#

I can send you the videos that I learnt from, but its a long playlist, I learned mostly through developing myself and learning from my mistakes

brisk bay
#

ill send you who i watched

solemn halo
brisk bay
#

I don't know if hes any good anymore but I learned from him

#

just made a game and put all of what I learned in it

solemn halo
#

I'll watch it. Thank you so much!

brisk bay
velvet sundial
#

On Udemy

#

This course really is amazing

#

I recommend you to check it out

solemn halo
lucid flint
solemn halo
tranquil glenBOT
#

studio** You are now Level 1! **studio

brisk bay
solemn halo
brisk bay
tranquil glenBOT
#

studio** You are now Level 2! **studio