Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Need help with a script that gives a player reward from a NPC?

So i need help with a script that gives a player 1000 cash/currency. Example if a player talks to a NPC then the player has 2 options ( Goodbye! and Redeem) If the player clicks Redeem then the player gets 1000 cash/currency. The player can only redeem 1 time per server.

Script type : Normal

Picture 1 https://imgur.com/CSzDpZr

Picture 2 https://imgur.com/7nGVJwF

And when the player clicks redeem he gets 1000 cash/currency


If you need more information ask in the comments


1 answer

This is a local script

local dialog = -- path goes here
dialog.DialogChoiceSelected:Connect(function(player, select)
-- select is a chosen option, player is the client who chose it
if select.Name == "" -- redeem? 
then player.leaderstats.money -- etc.
end -- else can also go here
end)

2 comments

0

change select to option as a param since it's already registered !

0

Can I get your discord?

This discussion is preserved as it was. New answers, comments, and votes are closed.