Voidtexx
|
  |
| Joined: 25 May 2011 |
| Total Posts: 1194 |
|
|
| 15 Mar 2016 07:15 PM |
hey, I made a dialog shop script and it isn't really working.. any help or tips?
this is the leaderboard 'voidbuxx' script that gives you one voidbuxx every 12 seconds
----------------------------------------- local ds = game:GetService('DataStoreService'):GetDataStore('VOIDTEXX IS THE BEST PERSON TBH SMH FAM');
game.Players.PlayerAdded:connect(function(plr) plr:WaitForChild('leaderstats').Voidbuxx.Value = ds:GetAsync(plr.userId) or 0; while wait(12) do plr:WaitForChild('leaderstats').Voidbuxx.Value = plr:WaitForChild('leaderstats').Voidbuxx.Value + 12; end end)
game.Players.PlayerRemoving:connect(function(plr) ds:UpdateAsync(plr.userId, function(old) return plr.leaderstats.Voidbuxx.Value end) end)
--------------------------------------------------------------------------------------
and this is the script i insert into the player head to create the shop [ with a dialog and response. ]
script.Parent.DialogChoiceSelected:connect(function(player, choice) if (choice == script.Parent.Choice1) then if (player.leaderstats.VoidBuxx.Value >= 5) then lemonade = game.Lighting["lemonade"]:clone() lemonade.Parent = player.Backpack player.leaderstats.VoidBuxx.Value = player.leaderstats.Credits.Value - 5 script.Parent.Choice1.ResponseDialog = "have a halathonish day" else script.Parent.Choice1.ResponseDialog = "i onleah speak 2 dah moolaaaaaahhh" end ----------------- so what am i doing wrong?
|
|
|
| Report Abuse |
|
|
|
| 15 Mar 2016 07:16 PM |
"VOIDTEXX IS THE BEST PERSON TBH SMH FAM" I think thats the error, it needs to return true but its returning false
Kappa
|
|
|
| Report Abuse |
|
|
Voidtexx
|
  |
| Joined: 25 May 2011 |
| Total Posts: 1194 |
|
|
| 15 Mar 2016 07:33 PM |
so they would both work together if I remove that 'voidtexx thb' playerdata thing?
|
|
|
| Report Abuse |
|
|
Voidtexx
|
  |
| Joined: 25 May 2011 |
| Total Posts: 1194 |
|
|
| 15 Mar 2016 07:35 PM |
this is what line 2 says
plr:WaitForChild('leaderstats').Voidbuxx.Value = ds:GetAsync(plr.userId) or 0;
'ds'
|
|
|
| Report Abuse |
|
|
Voidtexx
|
  |
| Joined: 25 May 2011 |
| Total Posts: 1194 |
|
| |
|