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 » Scripting Helpers
Home Search
 

Lightning Ambient Night Vision Radar Script

Previous Thread :: Next Thread 
TimeworksX is not online. TimeworksX
Joined: 14 Feb 2011
Total Posts: 421
11 Aug 2011 12:54 PM
I tried to get this working, but it wont do anything. Also output says nothing, but runnung script. PLZ HELP



print("button loaded")
button = script.Parent
function onClicked(GUI)
if game.Lighting.Ambient == Color3.new(128,128,128) or if game.Lighting.Ambient == Color3.new(17,17,17) then
game.Lighting.Ambient = Color3.new(0, 204, 0)
game.Workspace.StarterGui.GUIRadar.Full.Visible = true
game.Workspaace.StarterGui.GUIRadar.Frame.Visible = true
button.Text = "Night Vision On"
else if game.Lightning.TimeOfDay == (14:00:00) then
game.Lightning.Ambient = Color3.new(128,128,128)
game.StarterGui.GUIRadar.Frame.Visible = false
game.StarterGui.GUIRadar.Full.Visible = false
button.Text = "Night Vision Off"
else if game.Lightning.TimeOfDay == (06:10:00) then
game.Lightning.Ambient = Color3.new(128,128,128)
game.StarterGui.GUIRadar.Frame.Visible = false
game.StarterGui.GUIRadar.Full.Visible = false
button.Text = "Night Vision Off"
else if game.Lightning.TimeOfDay == (24:00:00) then
game.Lightning.Ambient = Color3.new(17,17,17)
game.StarterGui.GUIRadar.Frame.Visible = false
game.StarterGui.GUIRadar.Full.Visible = false
button.Text = "Night Vision Off"

end
end
end
end
script.Parent.MouseButton1Click:connect(onClicked)
Report Abuse
TimeworksX is not online. TimeworksX
Joined: 14 Feb 2011
Total Posts: 421
11 Aug 2011 12:58 PM
i kept trying output, and it said this:

Players.TimeworksX.PlayerGui.Night Vision GUI.Night Vision.Script:4: unexpected symbol near 'if'
Report Abuse
MXrcr20 is not online. MXrcr20
Joined: 01 Oct 2008
Total Posts: 2644
11 Aug 2011 01:01 PM
"if game.Lighting.Ambient == Color3.new(128,128,128) or if game.Lighting.Ambient == Color3.new(17,17,17) then"

Replace with:

if game.Lighting.Ambient == Color3.new(128,128,128) or game.Lighting.Ambient == Color3.new(17,17,17) then
Report Abuse
TimeworksX is not online. TimeworksX
Joined: 14 Feb 2011
Total Posts: 421
11 Aug 2011 01:04 PM
ok thx
Report Abuse
TimeworksX is not online. TimeworksX
Joined: 14 Feb 2011
Total Posts: 421
11 Aug 2011 01:07 PM
now output says this


Players.TimeworksX.PlayerGui.Night Vision GUI.Night Vision.Script:9: ')' expected near ':'
Report Abuse
TimeworksX is not online. TimeworksX
Joined: 14 Feb 2011
Total Posts: 421
11 Aug 2011 01:10 PM
bump
Report Abuse
TimeworksX is not online. TimeworksX
Joined: 14 Feb 2011
Total Posts: 421
11 Aug 2011 01:20 PM
~~~Bumples~~~
Report Abuse
TimeworksX is not online. TimeworksX
Joined: 14 Feb 2011
Total Posts: 421
11 Aug 2011 01:38 PM
i am starting to think that knowone knowes how to fix this....
Report Abuse
doepey590 is not online. doepey590
Joined: 16 Sep 2008
Total Posts: 1187
11 Aug 2011 01:44 PM
soo much wrong with this script, give me a minute.
Report Abuse
doepey590 is not online. doepey590
Joined: 16 Sep 2008
Total Posts: 1187
11 Aug 2011 01:49 PM
print("button loaded")
button = script.Parent
function onClicked(GUI)
if game.Lighting.Ambient == Color3.new(128,128,128) or game.Lighting.Ambient == Color3.new(17,17,17) then
game.Lighting.Ambient = Color3.new(0, 204, 0)
game.Workspace.StarterGui.GUIRadar.Full.Visible = true
game.Workspace.StarterGui.GUIRadar.Frame.Visible = true --fixed here
button.Text = "Night Vision On"
elseif game.Lightning.TimeOfDay == "14:00:00" then -- fixed here
game.Lightning.Ambient = Color3.new(128,128,128)
game.StarterGui.GUIRadar.Frame.Visible = false
game.StarterGui.GUIRadar.Full.Visible = false
button.Text = "Night Vision Off"
elseif game.Lightning.TimeOfDay == "06:10:00" then -- fixed here
game.Lightning.Ambient = Color3.new(128,128,128)
game.StarterGui.GUIRadar.Frame.Visible = false
game.StarterGui.GUIRadar.Full.Visible = false
button.Text = "Night Vision Off"
elseif game.Lightning.TimeOfDay == "24:00:00" then -- fixed here
game.Lightning.Ambient = Color3.new(17,17,17)
game.StarterGui.GUIRadar.Frame.Visible = false
game.StarterGui.GUIRadar.Full.Visible = false
button.Text = "Night Vision Off"
end -- only need 2 ends
end
script.Parent.MouseButton1Click:connect(onClicked)
Report Abuse
TimeworksX is not online. TimeworksX
Joined: 14 Feb 2011
Total Posts: 421
11 Aug 2011 01:56 PM
thx man
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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