darthpyro
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 3569 |
|
|
| 21 Sep 2013 08:54 PM |
-snip- if #people < 1 then script.Parent.Alerts.Alert_0.TextLabel.Text = "No valid players to select!" script.Parent.Alerts.Alert_0:TweenPosition(UDim2.new(0.5, -250, 0, 150), "Out", "Bounce", 2, false) wait(3.5) script.Parent.Alerts.Alert_0:TweenPosition(UDim2.new(0.5, -250, 0, -50), "Out", "Quint", 0.75, false) return "_CANCEL" end -snip-
It DOES notice that #people<1. It DOES Tween the GUI and tell me there are no players. It DOES Tween off. It (presumably) returns "_CANCEL".
script.Parent.AdminGUI.VIPButton.MouseButton1Down:connect(function() repeat wait() local c = PlayerList(false, false, false) until c ~= nil if c == "_CANCEL" then return end local chosen = game.Players:findFirstChild(c)
Game lags, assumably because of the wait(). How am I supposed to tell it to wait until something has changed, yet still have a way to cancel the function (I can't return nil) so we don't have hundreds of functions sitting there idle?
|
|
|
| Report Abuse |
|
|
darthpyro
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 3569 |
|
|
| 21 Sep 2013 09:03 PM |
Be you not a man?
Fix my problems.
Oh wait. I forgot. Is not possible. |
|
|
| Report Abuse |
|
|
darthpyro
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 3569 |
|
|
| 22 Sep 2013 06:22 AM |
| I don't believe you solved my issue, Infocus. |
|
|
| Report Abuse |
|
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
| |
|
darthpyro
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 3569 |
|
| |
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
| |
|
darthpyro
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 3569 |
|
|
| 22 Sep 2013 06:27 AM |
It's a prompt. It prompts them to click a name. But if there are no names to click / they click cancel it should stop. But even when there aren't enough players, I get an error on line 103:
local chosen = game.Players:findFirstChild(c)
c is not a valid member of Players
So obviously something is wrong here? How would I prompt them to click something, wait for them to click something, then check whether they clicked a name or clicked cancel? |
|
|
| Report Abuse |
|
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
|
| 22 Sep 2013 06:30 AM |
| Whats the playerlist function |
|
|
| Report Abuse |
|
|
darthpyro
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 3569 |
|
|
| 22 Sep 2013 06:32 AM |
| It's my long function which prompts them to choose a player. |
|
|
| Report Abuse |
|
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
|
| 22 Sep 2013 06:34 AM |
Try making a boolvalue that changes to true if clicked a player, else false
Idk Q-Q
*asplodes* |
|
|
| Report Abuse |
|
|