Script won't enable or disable a gui

Hello, I have recently been working on my new game and I have been trying to create a goal gui that enables if a player doesn’t have a badge and disables if they have it. I tried everything to get it to work and even asked some of my friends to look at it. They said the script is fine but it would not run. I came here to post if anybody can see what’s wrong with the script.
image

image

1 Like

Oh, alright, I will do that, thanks

No don’t, that’s a dumb idea my brain was out.
Try to put the entire script as a local script.

Please use a LocalScript | Roblox Creator Documentation with -

local Player = game.Players.LocalPlayer
--And
if badge:UserHasBadgeAsync(badge.BadgeId,123) then
1 Like