uglypoe
|
  |
| Joined: 26 Mar 2011 |
| Total Posts: 4382 |
|
|
| 14 Oct 2015 07:23 PM |
The very bottom "return true" works, but the top and middle returns don't. What's wrong here?
function game.ReplicatedStorage.PokeMessage.OnClientInvoke(name) local poke = game.ReplicatedStorage.CurrentData:InvokeServer(name) if poke ~= 0 then local area = script.Parent.MessageDisplayGui.HoldingFrame script.Parent.Parent.Character.Torso.Anchored = true area.MessageText.Text = "You seem to already have this pokemon\nWould you like to replace it with this new one?" area.YesButton.Visible = true area.NoButton.Visible = true area.YesButton.MouseButton1Click:connect(function() area.YesButton.Visible = false area.NoButton.Visible = false area.MessageText.Text = "" script.Parent.Parent.Character.Torso.Anchored = false return(true) end) area.NoButton.MouseButton1Click:connect(function() area.YesButton.Visible = false area.NoButton.Visible = false area.MessageText.Text = "" script.Parent.Parent.Character.Torso.Anchored = false return(false) end) else return(true) end end
-- Praise RNGeezus -- |
|
|
| Report Abuse |
|
|
uglypoe
|
  |
| Joined: 26 Mar 2011 |
| Total Posts: 4382 |
|
|
| 14 Oct 2015 07:45 PM |
Bumperino
-- Praise RNGeezus -- |
|
|
| Report Abuse |
|
|
uglypoe
|
  |
| Joined: 26 Mar 2011 |
| Total Posts: 4382 |
|
|
| 14 Oct 2015 07:56 PM |
Only the last "return true" is returning True, the other two are returning Nil
-- Praise RNGeezus -- |
|
|
| Report Abuse |
|
|
uglypoe
|
  |
| Joined: 26 Mar 2011 |
| Total Posts: 4382 |
|
|
| 14 Oct 2015 08:07 PM |
Nevermind, found the error myself. The middle and top return's were trying to return to the mousebutton1click functions instead of the OnClientInvoke function.
-- Praise RNGeezus -- |
|
|
| Report Abuse |
|
|