You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want to create an advanced obby that gives you auras and gears depending on how many wins you have. -
What is the issue? Include screenshots / videos if possible!
There were no errors but the scripts don’t give me the stuff I want. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried checking how many wins I had, I had 2 wins.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local gears = game.ServerStorage.Gears
local winsGears = {
{1, gears.GravityCoil},
{2, gears["Acceleration Coil"]}
}
game.Players.PlayerAdded:Connect(function(plr)
local wins = plr:WaitForChild("leaderstats"):WaitForChild("Wins")
plr.CharacterAdded:Connect(function(character)
wait(0.5)
for i, gear in pairs(winsGears) do
if wins.Value >= gear[1] then
gear[2]:Clone().Parent = plr.Backpack
end
end
end)
end)
local tags = {
{1, "Intermediate", "#4dff00"}
--{5, "Good", "#ffea00"},
--{10, "Pro", "#ff0000"},
--{20, "God", "#4000ff"},
--{30, "Undefeated", "#292929"}
}
game.Players.PlayerAdded:Connect(function(plr)
local tagColor
local tagText
local rank
plr.CharacterAdded:Connect(function(char)
wait(0.5)
for i, tag in pairs(tags) do
if plr.leaderstats.Wins.Value >= tag[1] then
tagColor = tag[3]
tagText = tag[2]
rank = tag[1]
end
if rank ~= nil and game.ServerStorage.Effects:FindFirstChild(rank) then
local effect = game.ServerStorage.Effects[rank].Attachment:Clone()
effect.Parent = char.HumanoidRootPart
end
end
end)
end)
I noticed that after I respawn, my character receives the gears.