generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Lol. Do bool values work with if statements?

Previous Thread :: Next Thread 
PennslyvaniaRoadGeek is not online. PennslyvaniaRoadGeek
Joined: 06 Jan 2012
Total Posts: 404
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
PennslyvaniaRoadGeek is not online. PennslyvaniaRoadGeek
Joined: 06 Jan 2012
Total Posts: 404
25 Oct 2016 06:44 PM
Bump
Report Abuse
PennslyvaniaRoadGeek is not online. PennslyvaniaRoadGeek
Joined: 06 Jan 2012
Total Posts: 404
25 Oct 2016 06:56 PM
BuMp
Report Abuse
cntkillme is not online. 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 is online. 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
PennslyvaniaRoadGeek is not online. PennslyvaniaRoadGeek
Joined: 06 Jan 2012
Total Posts: 404
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 is not online. 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
PennslyvaniaRoadGeek is not online. PennslyvaniaRoadGeek
Joined: 06 Jan 2012
Total Posts: 404
25 Oct 2016 07:19 PM
Nope. Doesn't work at the if statement.
Report Abuse
ContentCrown is not online. ContentCrown
Joined: 06 Apr 2014
Total Posts: 6461
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image