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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Why doesn't this work?

Previous Thread :: Next Thread 
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
11 May 2013 01:49 AM
if Msg:sub(1, 7) == "#bright" then
local Bright = Msg:sub(Msg:find(" ", 8) + 1)
a = Instance.new("IntValue", game.Workspace)
a.Value = tonumber(Bright)
game.Lighting.Brightness = a.Value
wait(1)
a=nil
end
-----------
if Msg:sub(1, 9) == "#FogStart" then
local Danumber = Msg:sub(Msg:find(" ", 9) + 1)
a=Instance.new("IntValue", game.Workspace)
a.Value = tonumber(Danumber)
game.Lighting.FogStart = a.Value
wait(1)
a = nil
end
-----
end)
end)
--------------------------------
No output.
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
11 May 2013 02:10 AM
I tried changing it to this:

if Msg:sub(1, 9) == "#FogStart" then
local Danumber = Msg:sub(Msg:find(" ", 9) + 1)
v=Instance.new("IntValue", Workspace)
v.Value = tonumber(Danumber)
game.Lighting.FogStart.Value = v
end

Output: attempt to index field 'FogStart' (a number value)
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
11 May 2013 03:08 AM
Never mind I fixed both.
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