Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you make a OnTouched Badge script?

Asked by 9 years ago

How do you make a platform, and it will give you a badge when your character touches it?

Question #1

3 answers

Log in to vote
0
Answered by 9 years ago

If you create a badge and upload it to a place, ROBLOX will automatically put a badge giver model in your models. Just use that.

0
Thanks for your advice, Just wanted to know before Uploading a badge. TheLUAII 0 — 9y
Ad
Log in to vote
0
Answered by
Nymint 85
9 years ago

Use BadgeService and see the what you can do with the service,

Local BS=Game:GetService("BadgeService") 
local PS=Game:GetService("Players")
local bin=script.Parent
local BadgeID=512893 --Works as long as you're the owner of a certain badge with certain ID

bin.Touched:connect(function(Hit)
if Hit.Parent:FindFirstChild("Humanoid").Health~=0 then
local player=PS:GetPlayerFromCharacter(Hit.Parent) if player then
if player.userId<=100==nil then --[[Makes sure guests can't use it, without this line, guests would glitch the script, I think.]]
BS:AwardBadge(player.userId,BadgeID) end end end)
Log in to vote
0
Answered by 9 years ago

Well, when the badge is made, go into Roblox Studio. Make sure you have the Tool Box open, if you dont have it open, go to View -> Tool Box. Click My Models which is one of the options on the tool box. Your badge should be in there. The script is already in side the badge awarder!

Answer this question