so i want to reward players if they got premium and my script isn't working
it says "attempt to index field 'HDAdminMain' (a nil value)"
game:GetService("Players").PlayerAdded:Connect(function(Player)
if Player.MembershipType == Enum.MembershipType.Premium then
_G.HDAdminMain:GetModule("PlayerData"):ChangeStat(Player, "Rank", 2)
end
end)
also if you can tell me where to put the script that would help

1 comment
It means exactly that. GDAdminMain under _G is nil. It's not set.