Malfunctioning scripts

Hello, I wanted to know if someone could help me with a script to give the emblem to the player when he touches another part, I am not having success with it, could y
Picsart_23-07-03_20-33-01-600
ou send me a script or correct it That?

3 Likes

can you tell me what you see when u hover over it?

Please make sure to search the DevForum, this topic has already been brought up several times.

Try using UserHasBadgeAsync() in your script, instead of UserHadBadge()

 local id = 2124620845
 local giver = script.Parent
 local BadgeService = game:GetService(“BadgeService”)

 giver.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
	local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
	 if not BadgeService:UserHasBadgeAsync(plr.UserId, id) then
		BadgeService:AwardBage(plr.UserId, id)
	 end
end
 end)

Might have made a typo, but if it worked, let me know! :smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.