It’s based on a value within leaderstats and it doesn’t seem to work at all. No errors in output but I suspect that the problem has something to do with how I checked the leaderstats value because it functioned perfectly when I used “if Player.Name == “Turned_Away” then” instead.
local player = game:GetService("Players")
game.Players.PlayerAdded:connect(function(Player)
local HatID = Player:WaitForChild("leaderstats").hiddenstats.HatID -- Path to leaderstats
if HatID == 0 then
print("Success!")
end
end)