What this is supposed to do is when you join, it gives you a random element, makes a message saying your element and then clone the element tool from Lighting into the players backpack. There are no errors in the script but it wont work.
function onPlayerAdded(Player) Player:WaitForDataReady() Chakra = Instance.new("StringValue", Player) Chakra.Name = "Chakra" if Player:LoadString("Chakra") ~= "" then Chakra.Value = Player:LoadString("Chakra") else Elements = {"Water","Lighting","Fire","Wind","Earth"} i = math.random(1,#Elements) Players.Chakra.Value = Elements[i] Player:SaveString("Chakra", Player.Chakra.Value) Message = Instance.new("Message", Workspace) Message.Text = Chakra.Value game.Debris:AddItem(Message,10) end if Player.Chakra.Value == "Fire" then x = game.Lighting.Fireball:clone() elseif Player.Chakra.Value == "Water" then x = game.Lighting.Water:clone() elseif Player.Chakra.Value == "Lighting" then x = game.Lighting.Lighting:clone() elseif Player.Chakra.Value == "Wind" then x=game.Lighting.Wind:clone() elseif Player.Chakra.Value == "Earth" then x=game.Lighting.Earth:clone() end x.Parent = Player.Backpack end game.Players.PlayerAdded:connect(onPlayerAdded)
You have a typo on Line 10.
Players.Chakra.Value = Elements[i]
"Players" is not defined. However, "Player" is defined.