Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 1 year ago
Edited 1 year ago

Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.

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

0
Is the script a LocalScript? Jac_00b 157 — 1y
0
Nope guardian_stone 12 — 1y
0
thats your issue, LocalPlayer doesnt work in server scripts allybally12345 40 — 1y
0
THANK BRO ITS FIXED! guardian_stone 12 — 1y

1 answer

Log in to vote
0
Answered by 1 year ago

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

Ad

Answer this question