Pen54321
|
  |
| Joined: 11 Jul 2012 |
| Total Posts: 8894 |
|
|
| 05 Jan 2016 05:34 PM |
the same thing, which is basically stay as sell. Do you know how I can make it so it can be BUY instead. Here are the updateAsyncs and if statement.
if (Building0Owner:GetAsync(key, p)) then script.Parent.Text = "SELL" else script.Parent.Text = "BUY" end
Building0Owner:UpdateAsync(key, function(oldValue) local newValue = oldValue or p newValue = "NotOwned" return newValue end)
Building0Owner:UpdateAsync(key, function(oldValue) local newValue = oldValue or "NotOwned" newValue = p return newValue end)
|
|
|
| Report Abuse |
|
|
Pen54321
|
  |
| Joined: 11 Jul 2012 |
| Total Posts: 8894 |
|
| |
|
Pen54321
|
  |
| Joined: 11 Jul 2012 |
| Total Posts: 8894 |
|
| |
|
Pen54321
|
  |
| Joined: 11 Jul 2012 |
| Total Posts: 8894 |
|
| |
|
Pen54321
|
  |
| Joined: 11 Jul 2012 |
| Total Posts: 8894 |
|
| |
|
Pen54321
|
  |
| Joined: 11 Jul 2012 |
| Total Posts: 8894 |
|
| |
|
icanxlr8
|
  |
| Joined: 25 Feb 2009 |
| Total Posts: 3686 |
|
|
| 05 Jan 2016 06:45 PM |
if (Building0Owner:GetAsync(key, p) == value) then -- Replace value with what you want it to equal, without this it fires whenever it receives any value. script.Parent.Text = "SELL" else script.Parent.Text = "BUY" end
Building0Owner:UpdateAsync(key, function(oldValue) local newValue = oldValue or p newValue = "NotOwned" return newValue end)
Building0Owner:UpdateAsync(key, function(oldValue) local newValue = oldValue or "NotOwned" newValue = p return newValue end)
Rock on! http://www.roblox.com/games/121584089/Rock-Roleplay |
|
|
| Report Abuse |
|
|
Pen54321
|
  |
| Joined: 11 Jul 2012 |
| Total Posts: 8894 |
|
| |
|