✓ Accepted answer
The problem is that badgeservice uses a serverscript not a local script. Something you can do however is to make a server script to check if the player meets the requirements, Then send a fireclient request from a remoteevent for the local script to change the things for that player only, Just keep in mind that the local script should be parented to starterplayer scripts
A example is like
Server Script:
game.Players.PlayerAdded:Connect(function(Plr)
local UserId = Plr.UserId
local BadgeService = game:GetService("BadgeService")
if BadgeService:UserHasBadgeAsync(UserId, 2124700001) then
game.ReplicatedStorage.Blahblah:FireClient(Plr)
end
end)
Local script: (parented as parent being its ancestor)
game.ReplicatedStorage.Blahblah.OnClientEvent:Connect(function()
workspace.everything.tom2.tom3.BrickColor = BrickColor.new("Sea green")
end)
hope this helped
1 comment
thats the problem. badgeservice uses serverscript not local script