|
| 16 Oct 2015 04:27 PM |
local Dialog = script.Parent
Dialog.DialogChoiceSelected:connect(function(Player, Choice) if not Player then return end if Choice.Name == "Choice1" and Player.PlayerGui:findFirstChild("ShopGui") == nil then local Gui = script.Parent.ShopGui:clone() Gui.Parent = Player.PlayerGui end end)
Instead of clicking choices, how can I get ShopGui to open upon clicking the Dialog. |
|
|
| Report Abuse |
|
|
Xonious
|
  |
| Joined: 01 Jan 2009 |
| Total Posts: 1820 |
|
| |
|
Xonious
|
  |
| Joined: 01 Jan 2009 |
| Total Posts: 1820 |
|
|
| 16 Oct 2015 04:33 PM |
--Your welcome - Xonious
function check(Player, Choice) if Choice.Name == "Choice1" and Player.PlayerGui:findFirstChild("ShopGui") == nil then local Gui = script.Parent.ShopGui:clone() Gui.Parent = Player.PlayerGui end end
script.Parent.DialogChoiceSelected:connect(check)
|
|
|
| Report Abuse |
|
|