#My Clan scripting wasnt working can you tell me why and help me fix it??

9 messages · Page 1 of 1 (latest)

forest monolith
#

RARITY SCRIPT
game.Players.PlayerAdded:Connect(function(Player)
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")

local Races = {
    Common = 50,
    Uncommon = 30,
    Rare = 15,
    Epic = 9,
    Legendary = 1,
    
}

local sum = 0
for _,Values in pairs.(Races) do
    sum = sum + Values
end

local function getRandomItem()
    local RaceValue = Random.new()NextNumber(0,sum)
    for item, value in pairs(Races) do
        RaceValue = RaceValue - value
        if RaceValue < 0 then
            return item
        end
    end
end



local DataFolder = Instance.new('Folder', Player)
DataFolder.Name = "DataFolder"

local race = Instance.new("StringValue", DataFolder)
Race.Name = "Clan"

local Race1 = Instance.new("NumberValue", DataFolder)
Race1.Name = "Spins"

Race.Value = getRandomItem()
Race1.Value = 5

end

SPINS
local RS = game:GetService("RunService")

RS.Heartbeat:Connect(function()
script.Parent.Text = "Current Spins:" .. game.Players.LocalPlayer:WaitForChild("DataFolder").Spins.Value
end)
CLAN
local RS = game:GetService("RunService")

RS.Heartbeat:Connect(function()
script.Parent.Text = "Current Clan:" .. game.Players.LocalPlayer:WaitForChild("DataFolder").Clan.Value
end)

#

Pleas help

#

ive been working on this

#

4 like 20 minutes

#

tryna find the bug in the scripts

prime quest
#

hmmm

#

dm me

balmy walrus
# prime quest hmmm

Why are you asking everyone to dm you that fr makes you look like a scammer

#

Could you tell what exactly does not work