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...

01game.Players.PlayerAdded:Connect(function(plr)
02    plr.CharacterAdded:Connect(function(char)
03        wait(3)
04 
05        local cTag = game:GetService("ServerStorage"):WaitForChild("Tag"):Clone()
06        cTag.Parent = char.Head
07 
08        cTag.PlrName.Text = plr.Name
09        cTag.Rank.Text = "Dumb Newbie"
10 
11        if plr:WaitForChild("leaderstats"):FindFirstChild("Rebirths").Value <= 0 then
12            cTag.Rank.Text = "Dumb Newbie"     
13        elseif plr:WaitForChild("leaderstats"):FindFirstChild("Rebirths").Value <= 3 then
14            cTag.Rank.Text = "Smart Newbie"
15        elseif plr:WaitForChild("leaderstats"):FindFirstChild("Rebirths").Value <= 5 then
View all 41 lines...
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.

1game.Players.PlayerAdded:Connect(function(player)
2       local leaderstats = Instance.new('Folder', player)
3       leaderstats.Name = 'leaderstats'
4 
5       local Rebirths = Instance.new('NumberValue', leaderstats)
6       Rebirths.Name = 'Rebirths'
7       Rebirths.Value = 0
8end)

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

01local plr = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
02local char = plr.Character or plr.CharacterAdded:Wait()
03    if char then
04        local head = char:WaitForChild("Head")
05        if head then
06        local cTag = game:GetService("ReplicatedStorage").Tag:Clone()
07        cTag.Parent = head
08 
09while wait() do
10        cTag.PlrName.Text = plr.Name
11        if plr:WaitForChild("leaderstats").Rebirths.Value <= 0 then
12            cTag.Rank.Text = "Dumb Newbie"     
13        elseif plr:WaitForChild("leaderstats").Rebirths.Value <= 3 then
14            cTag.Rank.Text = "Smart Newbie"
15        elseif plr:WaitForChild("leaderstats").Rebirths.Value <= 5 then
View all 42 lines...
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