Is it possible to use :UserHasBadgeAsync in a LocalScript

Is it possible, and if not, what are the alternatives/other options?

1 Like

No. BadgeService is server only. You can, however, use a remote function so the client can request if they have it. What is your use-case though?

It’s in a GUI where players can spawn certain vehicles, depending on if they hold particular badges.

Then you can continue with a remote function. But make sure exploiters can’t spawn without the badge!

Yes, you can but only for the LocalPlayer. Same deal as UserOwnsGamePassAsync, which is why I deleted this post earlier, cause I thought you said that.

2 Likes

I think the vehicles are spawning on server-side, just before spawning them check if the user owns the badge, if not don’t spawn the vehicle.