I am attempting for the game to say if a player has a donate pass in a GUI. Here is what I have:
vipItem = 346341127
player = game.Players.LocalPlayer
if game:GetService("BadgeService"):UserHasBadge(player.UserId, vipItem) then
script.Parent.owns1 = game.Players.LocalPlayer.Name.. "has not donated!"
else
script.Parent.owns1 = game.Players.LocalPlayer.Name.. "has donated!"
end
For some reason, it does not work.

3 comments
Your asset id stored in
vipItemis for a GamePass not a Badge: https://www.roblox.com/VIP-item?id=346341127This is a script from a door only for VIPs. It worked, but when I made it a notification, it didn't work.
I'm confused.... You said it was for a badge in the title, but in the question you say if they have donate pass? And then you have it as a VIP pass, instead of donate pass? Can you please explain a little more. If you change the id to a badge, it will work, but if you want to check if they have a pass you can use PlayerOwnsAsset