Hello!
I am making a game that requires a person to choose to either double an amount of robux, or accept it. How do you think I should approach this?
I thought of using a chatted event and then to a GUI button, but it just does not feel right, what would you do? (i’m kind of new here I dont even know if this is the right category)
1 Like
I’m pretty sure this belongs in #help-and-feedback:scripting-support.
If it were me (And keep in mind-my knowledge is very limited, there will probably be better ways to do this), I would use GUI for this. Prompt the user with a predetermined amount and a decline(take) or accept(double) button. If they click Accept, the value is doubled, and if they click Decline, the value is added to their (presumably leaderboard) balance.
hypothetical code
It would probably look something like this (Not tested code, probably has flaws, just an example to get the idea through)
local prompt = game.Players.LocalPlayer.PlayerGui.PromptF.Prompt
local number = nil --//predetermined number//--
local number2 = nil --//the amount the player has//--
local playerBalance = game.Players.LocalPlayer.PlayerGui.Balance.Value
prompt.Accept.MouseButton1Click:Connect(function()
prompt.value.Text = (number*2)
end)
prompt.Decline.MouseButton1Click:Connect(function()
playerBalance.Text = (number2 + number)
end)
Side note:
you probably know this, but you cannot give players robux. i assume that’s not what you’re trying to do, and that what you are doing is more along the lines of a “double
it or give it to the next person” involving fake robux, but better safe than sorry
yes I have the code, I just am on the verge of choosing ty for the idea!
1 Like
Oh sorry I completely forgot abt this part. I am not giving people robux, the people are donating it in game. For perks in dc and intake stuff. Kind of like a pls donate type thing.
1 Like
I recommend not using the word “robux” as your in-game currency as that can lead to confusion for younger people and also possibly might get you in trouble with moderation. Just trying to look out for you.
2 Likes
its not in game currency! its real. People can buy each others gamepasses.