Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

probleme with my frame not changing color if i got the badge needed?

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

0

Is the script a LocalScript?

0

Nope

0

thats your issue, LocalPlayer doesnt work in server scripts

0

THANK BRO ITS FIXED!

1 answer

the problem is already solved the localplayer wasnt in a local script so it hasnt worked thanks to allybally12345

This discussion is preserved as it was. New answers, comments, and votes are closed.