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!
Scripts in replicatedstorage does not run.
If checkbadge is fired by the server, then your scripts needs to be put in a localscript and you need to do game.Replicated.CheckBadge.OnClientEvent:connect(function(player, BadgeId)
elseif its fired by a client, replace OnClientEvent by OnServerEvent