How to create badge on part touch in roblox studio

Published: 14 August 2024
on channel: fil1pex
181
5

If you touch the part u get badge
SCRIPT:
---------------------------------
local badgeserv = game:GetService("BadgeService")
local BadgeId = your badge id here

script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and game.Players:FindFirstChild(hit.Parent.Name) then
local Player = game.Players[hit.Parent.Name]
badgeserv:AwardBadge(Player.UserId, BadgeId)
end
end)
--------------------------------------------