Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why won't this rank system work? There are no errors.. [closed]

Asked by 5 years ago

so, my friend gave me a rank system and it worked for him but didn't for me, there were no errors outputted, heres the code...

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(char)
        wait(3)

        local cTag = game:GetService("ServerStorage"):WaitForChild("Tag"):Clone()
        cTag.Parent = char.Head

        cTag.PlrName.Text = plr.Name
        cTag.Rank.Text = "Dumb Newbie"

        if plr:WaitForChild("leaderstats"):FindFirstChild("Rebirths").Value <= 0 then
            cTag.Rank.Text = "Dumb Newbie"      
        elseif plr:WaitForChild("leaderstats"):FindFirstChild("Rebirths").Value <= 3 then
            cTag.Rank.Text = "Smart Newbie"
        elseif plr:WaitForChild("leaderstats"):FindFirstChild("Rebirths").Value <= 5 then
            cTag.Rank.Text = "Average IQ Newbie"
        elseif plr:WaitForChild("leaderstats"):FindFirstChild("Rebirths").Value <= 7 then
            cTag.Rank.Text = "Unaverage IQ Newbie"
        elseif plr:WaitForChild("leaderstats"):FindFirstChild("Rebirths").Value <= 10 then
            cTag.Rank.Text = "Smart Person"
        elseif plr:WaitForChild("leaderstats"):FindFirstChild("Rebirths").Value <= 13 then
            cTag.Rank.Text = "Pretty Smart Person"
        elseif plr:WaitForChild("leaderstats"):FindFirstChild("Rebirths").Value <= 16 then
            cTag.Rank.Text = "Very Smart Person"
        elseif plr:WaitForChild("leaderstats"):FindFirstChild("Rebirths").Value <= 18 then
            cTag.Rank.Text = "High-IQ"
        elseif plr:WaitForChild("leaderstats"):FindFirstChild("Rebirths").Value <= 21 then
            cTag.Rank.Text = "Such Smart, Much IQ"
        elseif plr:WaitForChild("leaderstats"):FindFirstChild("Rebirths").Value <= 24 then
            cTag.Rank.Text = "70% in English Exams"
        elseif plr:WaitForChild("leaderstats"):FindFirstChild("Rebirths").Value <= 28 then
            cTag.Rank.Text = "Insane-IQ"
        elseif plr:WaitForChild("leaderstats"):FindFirstChild("Rebirths").Value <= 47 then
            cTag.Rank.Text = "Albert Einstein"
        elseif plr:WaitForChild("leaderstats"):FindFirstChild("Rebirths").Value <= 67 then
            cTag.Rank.Text = "Unbelievably Smart"
        elseif plr:WaitForChild("leaderstats"):FindFirstChild("Rebirths").Value <= 100 then
            cTag.Rank.Text = "Inf-IQ"           
        end
    end)
end)
0
You probably havent added a 'Tag' to the ServerStorage, also. Please check that. ISkyLordDoge 37 — 5y
0
its a model and it comes with the tag -.- dragonlolpp2 2 — 5y

Closed as Not Constructive by hiimgoodpack and JakyeRU

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

I think I know the problem, you haven't made a leaderstats. To do this, you'll need to add a script to the ServerScriptService and copy / paste the following.

game.Players.PlayerAdded:Connect(function(player)
       local leaderstats = Instance.new('Folder', player)
       leaderstats.Name = 'leaderstats'

       local Rebirths = Instance.new('NumberValue', leaderstats)
       Rebirths.Name = 'Rebirths'
       Rebirths.Value = 0
end)

Note: This was from the top of my head, so please don't judge me. Hope this helped you.

0
i already did make a leaderstts dragonlolpp2 2 — 5y
0
Oh, sorry. ISkyLordDoge 37 — 5y
0
its fine dragonlolpp2 2 — 5y
Ad
Log in to vote
0
Answered by
G2001H 75
5 years ago
Edited 5 years ago

Use localscript and put into StarterPlayerScripts, and the Tag from ServerStorage put in ReplicatedStorage. EDIT: https://gyazo.com/95b106c082a78c9787aa898d71a9e5d3

local plr = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local char = plr.Character or plr.CharacterAdded:Wait()
    if char then
        local head = char:WaitForChild("Head")
        if head then
        local cTag = game:GetService("ReplicatedStorage").Tag:Clone()
        cTag.Parent = head

while wait() do
        cTag.PlrName.Text = plr.Name
        if plr:WaitForChild("leaderstats").Rebirths.Value <= 0 then
            cTag.Rank.Text = "Dumb Newbie"      
        elseif plr:WaitForChild("leaderstats").Rebirths.Value <= 3 then
            cTag.Rank.Text = "Smart Newbie"
        elseif plr:WaitForChild("leaderstats").Rebirths.Value <= 5 then
            cTag.Rank.Text = "Average IQ Newbie"
        elseif plr:WaitForChild("leaderstats").Rebirths.Value <= 7 then
            cTag.Rank.Text = "Unaverage IQ Newbie"
        elseif plr:WaitForChild("leaderstats").Rebirths.Value <= 10 then
            cTag.Rank.Text = "Smart Person"
        elseif plr:WaitForChild("leaderstats").Rebirths.Value <= 13 then
            cTag.Rank.Text = "Pretty Smart Person"
        elseif plr:WaitForChild("leaderstats").Rebirths.Value <= 16 then
            cTag.Rank.Text = "Very Smart Person"
        elseif plr:WaitForChild("leaderstats").Rebirths.Value <= 18 then
            cTag.Rank.Text = "High-IQ"
        elseif plr:WaitForChild("leaderstats").Rebirths.Value <= 21 then
            cTag.Rank.Text = "Such Smart, Much IQ"
        elseif plr:WaitForChild("leaderstats").Rebirths.Value <= 24 then
            cTag.Rank.Text = "70% in English Exams"
        elseif plr:WaitForChild("leaderstats").Rebirths.Value <= 28 then
            cTag.Rank.Text = "Insane-IQ"
        elseif plr:WaitForChild("leaderstats").Rebirths.Value <= 47 then
            cTag.Rank.Text = "Albert Einstein"
        elseif plr:WaitForChild("leaderstats").Rebirths.Value <= 67 then
            cTag.Rank.Text = "Unbelievably Smart"
        elseif plr:WaitForChild("leaderstats").Rebirths.Value <= 100 then
            cTag.Rank.Text = "Inf-IQ"  
        end
        end
    end         
end
0
Hi TheJacksterYT 19 — 5y
0
no errors, but the rank says "Dumb Newbie" when i actually had 100 rebirths dragonlolpp2 2 — 5y
0
ill check G2001H 75 — 5y
0
dragonlolpp2 Done, i edited the script take it agan. now work G2001H 75 — 5y