workspace.Dialog.DialogChoiceSelected:connect(function(player,choice) if choice.Name == "I'll take the job!" then player.Character.Team = "Factory" elseif choice.Name == "Maybe some other time" then end end)
I want to try and add a line to pay 1000 Money to change teams to Factory but im having issues setting up the script. was wondering if anyone could give me a hand real quick if its not too much trouble
workspace.Dialog.DialogChoiceSelected:connect(function(player,choice) if choice.Name == "I'll take the job!" then if player.Coins >= 1000 then -- change player.Coins to wherever your coins are stored player.Coins = player.Coins - 1000 -- change player.Coins to wherever your coins are stored player.Character.Team = "Factory" else -- What happens when the player doesn't have the cash but tries to join anyways? end elseif choice.Name == "Maybe some other time" then end end)
This would make it work, I'd add new dialog options if the player doesn't have the cash.