|
| 25 Oct 2016 06:25 PM |
There is a gui that gets cloned into the playergui. When you click it there is a bool value that becomes true inside the gui. Am I doing something wrong? I use if statements. Say if its true, the code needs to work. Please help. If you don't understand just tell me, I will try to say it better.
game.Lighting.Ref:Clone().Parent=workspace game.Lighting.Coin:Clone().Parent=workspace cap0.Character.Torso.CFrame=CFrame.new(-1.5, 3, 143.5) cap0.Character.Torso.Anchored=true cap1.Character.Torso.CFrame=CFrame.new(-1.5, 3, 155.5) cap1.Character.Torso.Anchored=true wait(5) workspace.Ref.Head.Part.text.TextLabel.Text="Good Evening Everyone, Welcome To The Game!" wait(5) workspace.Ref.Head.Part.text.TextLabel.Text=away.Name.." Is The Away Team. It Is Their Pick." local display = game.Lighting.textstuff:Clone() display.Parent=cap1.PlayerGui heads = false tails = false dotehmath=math.random(1,2) if cap1.PlayerGui.textstuff.headsntails.HEADS.Value==true then wait(1) workspace.Ref.Head.Part.text.TextLabel.Text=away.Name.." Picks Heads." wait(5) if dotehmath == 1 then workspace.Ref.Head.Part.text.TextLabel.Text="It Is Heads" heads=true tails=false wait(3) if heads == true and tails == false then workspace.Ref.Head.Part.text.TextLabel.Text=away.Name.." Has Won The Toss" cap1.PlayerGui.textstuff.kicknreceive.Visible=true if cap1.PlayerGui.textstuff.kicknreceive.KICK.Value == true then workspace.Ref.Head.Part.text.TextLabel.Text=away.Name" Will KickOff. They Will Get Ball At Half." elseif cap1.PlayerGui.textstuff.kicknreceive.RECEIVE.Value == true then workspace.Ref.Head.Part.text.TextLabel.Text=away.Name" Will Receive. They Will Get Ball First." end end elseif dotehmath == 2 then workspace.Ref.Head.Part.text.TextLabel.Text="It Is Tails" heads=false tails=true wait(3) if heads == false and tails == true then workspace.Ref.Head.Part.text.TextLabel.Text=home.Name.." Has Won The Toss" display.Parent=cap0.PlayerGui cap0.PlayerGui.textstuff.kicknreceive.Visible=true if cap0.PlayerGui.textstuff.kicknreceive.KICK.Value == true then workspace.Ref.Head.Part.text.TextLabel.Text=home.Name" Will KickOff. They Will Get Ball At Half." elseif cap0.PlayerGui.textstuff.kicknreceive.RECEIVE.Value == true then workspace.Ref.Head.Part.text.TextLabel.Text=home.Name" Will Receive. They Will Get Ball First." end end end on = false cap1.PlayerGui.textstuff.headsntails.Heads.Value=false elseif cap1.PlayerGui.textstuff.headsntails.TAILS.Value==true then wait(1) workspace.Ref.Head.Part.text.TextLabel.Text=away.Name.." Picks Tails." wait(5) if dotehmath == 1 then workspace.Ref.Head.Part.text.TextLabel.Text="It Is Heads" heads=true tails=false wait(3) if heads == true and tails == false then workspace.Ref.Head.Part.text.TextLabel.Text=away.Name.." Has Won The Toss" cap1.PlayerGui.textstuff.kicknreceive.Visible=true if cap1.PlayerGui.textstuff.kicknreceive.KICK.Value == true then workspace.Ref.Head.Part.text.TextLabel.Text=away.Name" Will KickOff. They Will Get Ball At Half." elseif cap1.PlayerGui.textstuff.kicknreceive.RECEIVE.Value == true then workspace.Ref.Head.Part.text.TextLabel.Text=away.Name" Will Receive. They Will Get Ball First." end end elseif dotehmath == 2 then workspace.Ref.Head.Part.text.TextLabel.Text="It Is Tails" heads=false tails=true wait(3) if heads == false and tails == true then workspace.Ref.Head.Part.text.TextLabel.Text=home.Name.." Has Won The Toss" display.Parent=cap0.PlayerGui cap0.PlayerGui.textstuff.kicknreceive.Visible=true if cap0.PlayerGui.textstuff.kicknreceive.KICK.Value == true then workspace.Ref.Head.Part.text.TextLabel.Text=home.Name" Will KickOff. They Will Get Ball At Half." elseif cap0.PlayerGui.textstuff.kicknreceive.RECEIVE.Value == true then workspace.Ref.Head.Part.text.TextLabel.Text=home.Name" Will Receive. They Will Get Ball First." end end end on = false cap1.PlayerGui.textstuff.headsntails.TAILS.Value=false end repeat wait() until on == false |
|
|
| Report Abuse |
|
|
| |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 25 Oct 2016 07:01 PM |
| I didn't read the post but the answer to your title: of course |
|
|
| Report Abuse |
|
|
Laedere
|
  |
| Joined: 17 Jun 2013 |
| Total Posts: 23601 |
|
|
| 25 Oct 2016 07:02 PM |
correct me if im wrong but if statements ALWAYS involve bools so ur question is sorta odd |
|
|
| Report Abuse |
|
|
|
| 25 Oct 2016 07:08 PM |
| But i have a bool value object and when it is on the first if statement doesn't work :/ |
|
|
| Report Abuse |
|
|
dekkonot
|
  |
| Joined: 22 Dec 2010 |
| Total Posts: 6685 |
|
|
| 25 Oct 2016 07:10 PM |
| Are you sure it's not working? Put a print just after the if statement and see if it outputs anything. |
|
|
| Report Abuse |
|
|
|
| 25 Oct 2016 07:19 PM |
| Nope. Doesn't work at the if statement. |
|
|
| Report Abuse |
|
|
|
| 25 Oct 2016 08:52 PM |
| When people don't define varibles(especially from the part of the script that actually does stuff)... 🙄 |
|
|
| Report Abuse |
|
|