How can I change all the dialogue if the player already has a badge

Hello everyone, everything good?
I come to ask if it is possible to change the entire content of a dialogue if the player already has the proposed dialogue badge

Like, before the badge the dialogue tells you to win it and after you win and return the dialogue changes

Thank you for any help.

Check out this documentation

But from reading the documentation, it would be something like

local BADGE_ID = 00000000

  -- Check if the player has the Badge
	local success, hasBadge = pcall(BadgeService.UserHasBadgeAsync, BadgeService, player.UserId, badgeID)

  -- If there's an error, issue a warning and exit the function
	if not success then
		warn("Error while checking if player has Badge!")
		return
	end

	if hasBadge then
		-- put the badge logic here
	end

Ok, thanks!
The script would be located inside the dialog object or outside?

If you have a script with dialog, you can check before running the normal dialog if the player has a badge and change it from there.

1 Like

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