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

how do i make something give you a badge if you touch it? [closed]

Asked by 10 years ago

im trying to put a dog in my game that when you touch it it gives you a badge.

Closed as Not Constructive by User#2

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
1
Answered by 10 years ago

As the first answerer said, this is not a scripting REQUEST site. We help fix errors in scripts, not make them... anyways...

here you go...

put this in the brick

local badgeId = 12345 --Badge ID
local awarded = true

script.Parent.Touched:connect(function(hit)
    local plr = game.Players:FindPlayerFromCharacter(hit.Parent)
    if awarded and plr then
        game.BadgeService:AwardBadge(plr.userId,badgeId)    
        awarded=false
    end
end)

try that, idk. this is not a request site.

0
wait no FindPlayerFromCharacter its playerFromCharacter(hit.Parent) DominusAstra -2 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

What is your attempt of the script?Scripting helpers is NOTa request site

0
Im trying to make it give a badge ShudapGrandma 0 — 10y
0
What script did you use to make it award the badge!? iluvmaths1123 198 — 10y
0
im trying to get a script that does that ShudapGrandma 0 — 10y
0
Ok iluvmaths1123 198 — 10y
0
can you help me? ShudapGrandma 0 — 10y