So I have this script, which is suppose to change the dialogue of the parent (which is a textbox) to say test if the player owns a certain badge, however, this does not work. I have tried a local script but currently, it is in a server script like it started off.
function game.ReplicatedStorage.checkBadge(player, badgeId)
if game:GetService("BadgeService"):UserHasBadge(player.userId,981497474) then
script.Parent.Text = "test"
end
end
The script worked last year but since FE must be enabled I had to do some massive changes to the script, and this is no longer working.
The script is located in a gui which is found in the ReplicatedStorage. I would greatly appreciate it for some help, and if you could try to elaborate on your response rather than just saying one line of info, that would be very nice. Thanks!

1 comment
I'm a bit confused. Sorry, I don't work with scripts that much.