of     1   

zub74
#141240431Wednesday, July 23, 2014 4:14 AM GMT

Script works once, then doesn't work past that point. Any reason why? script.Parent.DialogChoiceSelected:connect(function(player, choice) -- Check the player has a stats object local values= Workspace.Values local stats = player:FindFirstChild('leaderstats') if not stats then return end Cash = stats:FindFirstChild('Cash') if not Cash then return end if choice == script.Parent.Building.Panel1 then print('test') if Cash.Value >= 500 then Cash.Value = Cash.Value - 500 Workspace.Values.Panel1.Value=true values.Value= not values.Value script.Parent.Building.Panel1:Remove() elseif Cash.Value <=500 then script.Parent.Building.Panel1.ResponseDialog=("Sorry, you don't have the cash!") end end end) --More stuff like above
zub74
#141242129Wednesday, July 23, 2014 4:33 AM GMT

B
zub74
#141248862Wednesday, July 23, 2014 5:44 AM GMT

B2
Funse
#141251886Wednesday, July 23, 2014 6:24 AM GMT

deb = false script.Parent.DialogChoiceSelected:connect(function(player, choice) -- Check the player has a stats object if deb == false then deb = true local values= Workspace.Values local stats = player:FindFirstChild('leaderstats') if not stats then return end Cash = stats:FindFirstChild('Cash') if not Cash then return end if choice == script.Parent.Building.Panel1 then print('test') if Cash.Value >= 500 then Cash.Value = Cash.Value - 500 Workspace.Values.Panel1.Value=true values.Value= not values.Value script.Parent.Building.Panel1:Remove() elseif Cash.Value <=500 then script.Parent.Building.Panel1.ResponseDialog=("Sorry, you don't have the cash!") deb = false end end end end)
zub74
#141252450Wednesday, July 23, 2014 6:31 AM GMT

Debouncing didn't work.
zub74
#141253449Wednesday, July 23, 2014 6:46 AM GMT

B
zub74
#141254308Wednesday, July 23, 2014 7:00 AM GMT

B2
zub74
#141257496Wednesday, July 23, 2014 7:55 AM GMT

B3
zub74
#141334913Thursday, July 24, 2014 1:39 AM GMT

Bump 4
zub74
#141336129Thursday, July 24, 2014 1:51 AM GMT

Bump 5 and full script: DB=false script.Parent.DialogChoiceSelected:connect(function(player, choice) -- Check the player has a stats object local values= Workspace.Values local stats = player:FindFirstChild('leaderstats') if not stats then return end Cash = stats:FindFirstChild('Cash') if not Cash then return end if choice == script.Parent.Building.Panel1 and DB==false then print('test') DB=true if Cash.Value >= 500 then Cash.Value = Cash.Value - 500 Workspace.Values.Panel1.Value=true values.Value= not values.Value script.Parent.Building.Panel1:Remove() elseif Cash.Value <=500 then script.Parent.Building.Panel1.ResponseDialog=("Sorry, you don't have the cash!") end DB=false end ------------------------------------------------------------- if choice == script.Parent.Building.Panel2 and DB==false then print('test') DB=true if Cash.Value >= 500 then Cash.Value = Cash.Value - 500 Workspace.Values.Panel2.Value=true values.Value= not values.Value script.Parent.Building.Panel2:Remove() elseif Cash.Value <=500 then script.Parent.Building.Panel2.ResponseDialog=("Sorry, you don't have the cash!") end DB=false end ------------------------------------------------------------- if choice == script.Parent.Building.Panel3 and DB==false then print('test') DB=true if Cash.Value >= 500 then Cash.Value = Cash.Value - 500 Workspace.Values.Panel3.Value=true values.Value= not values.Value script.Parent.Building.Panel3:Remove() elseif Cash.Value <=500 then script.Parent.Building.Panel3.ResponseDialog=("Sorry, you don't have the cash!") end DB=false end ------------------------------------------------------------- if choice == script.Parent.Building.Panel4 and DB==false then print('test') DB=true if Cash.Value >= 500 then Cash.Value = Cash.Value - 500 Workspace.Values.Panel4.Value=true values.Value= not values.Value script.Parent.Building.Panel3:Remove() elseif Cash.Value <=500 then script.Parent.Building.Panel4.ResponseDialog=("Sorry, you don't have the cash!") end DB=false end ------------------------------------------------------------- if choice == script.Parent.Building.Panel5 and DB==false then print('test') DB=true if Cash.Value >= 500 then Cash.Value = Cash.Value - 500 Workspace.Values.Panel5.Value=true values.Value= not values.Value script.Parent.Building.Panel5:Remove() elseif Cash.Value <=500 then script.Parent.Building.Panel5.ResponseDialog=("Sorry, you don't have the cash!") end DB=false end ------------------------------------------------------------- if choice == script.Parent.Building.Panel6 and DB==false then print('test') DB=true if Cash.Value >= 500 then Cash.Value = Cash.Value - 500 Workspace.Values.Panel6.Value=true values.Value= not values.Value script.Parent.Building.Panel6:Remove() elseif Cash.Value <=500 then script.Parent.Building.Panel5.ResponseDialog=("Sorry, you don't have the cash!") end DB=false end ------------------------------------------------------------- end)
zub74
#141338295Thursday, July 24, 2014 2:12 AM GMT

Help would be nice...
zub74
#141343019Thursday, July 24, 2014 3:00 AM GMT

Bump again.

    of     1