Problem = Players.Viktor_Void.PlayerGui.mainScreen.statFrame.statBar:5: attempt to index a nil value code with problem =
Player = script.Parent.Parent.Parent.Parent RS = game:GetService("ReplicatedStorage")
while wait() do script.Parent.strengthBar.Text = "Strength "..RS.statsFolder:FindFirstChild("Player.Name").Strength.Value script.Parent.perceptionBar.Text = "Perception "..RS.statsFolder:FindFirstChild("player.Name").Perception.Value script.Parent.enduranceBar.Text = "Endurance "..RS.statsFolder:FindFirstChild("player.Name").Endurance.Value script.Parent.wisdomBar.Text = "Wisdom "..RS.statsFolder:FindFirstChild("player.Name").Wisdom.Value script.Parent.agileBar.Text = "Agile "..RS.statsFolder:FindFirstChild("player.Name").Agile.Value script.Parent.fortuitousBar.Text = "Fortuitous "..RS.statsFolder:FindFirstChild("player.Name").Fortuitous.Value end
Code linked with problem question mark =
statsfolder = game.ReplicatedStorage:WaitForChild("statsFolder")
game.Players.PlayerAdded:connect(function(Player) local statData = Instance.new("Folder",statsfolder) statData.Name = Player.Name
local Strength = Instance.new("IntValue",statData) Strength.Name = "Strength" Strength.Value = 1 local Perception = Instance.new("IntValue",statData) Perception.Name = "Perception" Perception.Value = 1 local Endurance = Instance.new("IntValue",statData) Endurance.Name = "Endurance" Endurance.Value = 1 local Wisdom = Instance.new("IntValue",statData) Wisdom.Name = "Wisdom" Wisdom.Value = 1 local Agile = Instance.new("IntValue",statData) Agile.Name = "Agile" Agile.Value = 1 local Fortuitous = Instance.new("IntValue",statData) Fortuitous.Name = "Fortuitous" Fortuitous.Value = 1
end)
what I'm I doing wrong here