Help fix/add stuff to this script?

Ok, so I’m making a boss battle in my game, now I am watching this video for reference and using the kit provided in it: How to Make a BOSS BATTLE | HowToRoblox - YouTube

Now the problem is I want to make it so that when the boss is dead it awards you a badge, also I want to make it so that the boss battle doesn’t start unless you walk over a part and get inside the boss area (like you walk over a part and that triggers the boss to start the battle/boss attacks), how do I make such thing? (The script is found in the kit of the boss that is used in the video).

Please explain thoroughly as I’m a horrible scripter and still learning.

With the awarding badges. You would need to use the BadgeService:AwardBadge(User, BadgeID) to award the badge. With the variable for getting the badge service at the top under a local badge service = game:GetService(‘BadgeService’). So you would like need to have something that triggers it when the boss’s health is 0 then it triggers the badge to be awarded to the user.

Hey there,

First, about the Badge:

About the Brick, there are several ways to do that, one of them :
image

I’d recommend adding a debounce on the touched event, if you want.