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

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

Asked by 5 years ago
Edited 5 years ago

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

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

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)
0
change select to option as a param since it's already registered ! Sapppower 17 — 5y
0
Can I get your discord? johnoscarbhv1 137 — 5y
Ad

Answer this question