|
| 28 Oct 2014 10:09 AM |
Sometimes the message "Alliance with "..v.Name.." done." won't get destroyed. nothing in output
local Player = game:GetService("Players").LocalPlayer repeat wait() until Player Alliances = Player:FindFirstChild("Alliances")
script.Parent.MouseButton1Down:connect(function() local list = game.Players:getChildren() for i,v in pairs(list) do if v.TeamColor == BrickColor.new("Really blue") then if Alliances:findFirstChild(v.Name) ~= nil then Alliances[v.Name]:Destroy() local m = Instance.new("Message") m.Parent = Player.PlayerGui m.Text = "Alliance with "..v.Name.." undone." wait(2) m:Destroy() else if Player and v and Alliances then local newAlliance = Instance.new("StringValue") newAlliance.Name = v.Name newAlliance.Parent = Alliances local m = Instance.new("Message") m.Parent = Player.PlayerGui m.Text = "Alliance with "..v.Name.." done." wait(2) m:Destroy() end end end end end) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
bibo5o
|
  |
| Joined: 17 Jan 2009 |
| Total Posts: 414 |
|
|
| 28 Oct 2014 11:16 AM |
| Nope, I can't see anything wrong with that. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 29 Oct 2014 11:34 AM |
| This is in a localScript, and therefor the most immediate fault I can think of is if the script is removed (Player death or somehting) before the m:Destroy() line |
|
|
| Report Abuse |
|
|
|
| 29 Oct 2014 11:35 AM |
Discovered the problem anyway, it only happens if you close the gui before it's done.
kind of annoying :( |
|
|
| Report Abuse |
|
|
OzzyFin
|
  |
| Joined: 07 Jun 2011 |
| Total Posts: 3600 |
|
| |
|