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

How can you make a player recieve money (Candy in my case) After talking to an npc?

Asked by 5 years ago

i am building a trick or treat game but i do not know how or if it is possible to make a player recieve a random ammount of candy/money everytime they speak with an NPC, is there any to do that?

1 answer

Log in to vote
0
Answered by
royaltoe 5144 Moderation Voter Community Moderator
5 years ago

You can use the Dialog's InUse property to check when the conversation is over:

game.Workspace.Dialog:GetPropertyChangedSignal("InUse"):Connect(function()
    if(game.Workspace.Dialog.InUse == false)then
        --give the player candy
    end
end)
Ad

Answer this question