As said in the question,I’m trying to change de color of a frame if a badge is found here is my script
local Badgeservice = game:GetService("BadgeService")
local player = game.Players.LocalPlayer
local userid = player.UserId
local badge = script.Parent.badge.Value
if Badgeservice:UserHasBadgeAsync(userid, badge) then
script.Parent.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
end
please help me im lost

4 comments
Is the script a LocalScript?
Nope
thats your issue, LocalPlayer doesnt work in server scripts
THANK BRO ITS FIXED!