This problem here is pretty simple. The event doesn’t fire or print or anything. Now, there’s no errors later in the code, and I have no clue why this would yield for long enough to prevent the code from running, as this is at the very start of the script.
local ui = script.SpawnUI
local template = ui.Main.Template
local statts = require(game.ReplicatedStorage.Modules.Stats)
local EN = require(game.ReplicatedStorage.Modules.EternityNum)
local statsSeen = 0
game.Players.PlayerAdded:Connect(function(plr)
print("A")
plr.CharacterAdded:Connect(function(char)
print("B")
task.wait(2)
for i,v in char:GetDescendants() do
if v:IsA("BasePart") then
v.CollisionGroup = "BSKNPlayers"
end
end
local UIthing = ui:Clone()
for i,stat in UIthing.Main.Row1:GetChildren() do
if stat.Name ~= "ListLayout" then
stat.Stat.Value = plr.Stats:FindFirstChild(stat.statname.Value)
if not stat.Stat.Value then
stat.Stat.Value = plr.leaderstats:FindFirstChild(stat.statname.Value)
end
stat.statname:Destroy()
stat.UpdateText.Enabled = true
end
end
for i,stat in UIthing.Main.Row2:GetChildren() do
if stat.Name ~= "ListLayout" then
stat.Stat.Value = plr.Stats:FindFirstChild(stat.statname.Value)
if not stat.Stat.Value then
stat.Stat.Value = plr.leaderstats:FindFirstChild(stat.statname.Value)
end
stat.statname:Destroy()
stat.UpdateText.Enabled = true
end
end
for i,stat in UIthing.Main.Row3:GetChildren() do
if stat.Name ~= "ListLayout" then
stat.Stat.Value = plr.Stats:FindFirstChild(stat.statname.Value)
if not stat.Stat.Value then
stat.Stat.Value = plr.leaderstats:FindFirstChild(stat.statname.Value)
end
stat.statname:Destroy()
stat.UpdateText.Enabled = true
end
end
for i,stat in UIthing.Main.Row4:GetChildren() do
if stat.Name ~= "ListLayout" then
stat.Stat.Value = plr.Stats:FindFirstChild(stat.statname.Value)
if not stat.Stat.Value then
stat.Stat.Value = plr.leaderstats:FindFirstChild(stat.statname.Value)
end
stat.statname:Destroy()
stat.UpdateText.Enabled = true
end
end
for i,stat in UIthing.Main.Row5:GetChildren() do
if stat.Name ~= "ListLayout" then
stat.Stat.Value = plr.Stats:FindFirstChild(stat.statname.Value)
if not stat.Stat.Value then
stat.Stat.Value = plr.leaderstats:FindFirstChild(stat.statname.Value)
end
stat.statname:Destroy()
stat.UpdateText.Enabled = true
end
end
UIthing.Parent = char
UIthing.Adornee = char:WaitForChild("Head")
end)
local skill = plr:WaitForChild("Stats").Skill
local skillVis = plr:WaitForChild("leaderstats").Skill
local Sstat = plr.Stats:FindFirstChild(statts.MainStat)
if not Sstat then
Sstat = plr.leaderstats:FindFirstChild(statts.MainStat)
end
if Sstat then
Sstat.Changed:Connect(function()
skill.Value = EN.toScientific(EN.log10(Sstat.Value))
skillVis.Value = EN.short(skill.Value)
end)
end
end)
(Most of this code can be ignored, but I figured I’d include it for clarity’s sake. Also, all variables here are used, so I can’t remove them. neither A nor B print, and I tried replacing PlayerAdded with ChildAdded and also got nothing. I simply don’t know what’s going on here? Why would it yield for long enough to cause this?