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: Why doesnt this script work?

Previous Thread :: Next Thread 
seblind is not online. seblind
Joined: 10 Aug 2011
Total Posts: 91
23 Jun 2015 03:10 PM
local game.Lighting.Map1=Map1 <--- Right there at the first dot between game and
local game.Lighting.Map2=Map2 Lightning, that red dot has red text under it
local game.Lighting.Map3=Map3 I cant find the mistake .-.

function a1()
print 'Loading Pirate Castle Map!'
Map1=Workspace
Map2=Lighting
Map3=Lighting
end

function a2()
print 'Loading Space Map!'
Map1=Lighting
Map2=Workspace
Map3=Lighting
end

function a3()
print 'Loading Pyramid Map!'
Map1=Lighting
Map2=Lighting
Map3=Workspace
end
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
23 Jun 2015 03:11 PM
Wrong way
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
23 Jun 2015 03:11 PM
lol switch the variable around. Also use serverstorage instead of lighting. You should only leave the skybox in lighting.

local Map1 = game.ServerStorage.Map1
Report Abuse
seblind is not online. seblind
Joined: 10 Aug 2011
Total Posts: 91
23 Jun 2015 03:22 PM
Ah that explains it. Well, thanks! :D

And yes i do know about the server storage, it is just because i have to scroll more down to acces the server storage than lighting and when i have to switch between the maps alot it can get really annoying over time.

But hey, thanks again!
Report Abuse
seblind is not online. seblind
Joined: 10 Aug 2011
Total Posts: 91
23 Jun 2015 03:39 PM
NEVER MIND NEVER MIND.

Now in the
X=math.random(3)
if X==1 then
a3()
else
a2()
else
a1()
end

The second "else" is now marked with red text ... .-.
Report Abuse
KlinkStudios is not online. KlinkStudios
Joined: 31 Oct 2013
Total Posts: 563
23 Jun 2015 03:42 PM
Else will only work once, so use elseif.

X=math.random(3)
if X==1 then
a3()
elseif x = 2
a2()
elseif x = 3
a1()
end

u sicko!
Report Abuse
KlinkStudios is not online. KlinkStudios
Joined: 31 Oct 2013
Total Posts: 563
23 Jun 2015 03:42 PM
No wait use this:

local X=math.random(1,3)
if X==1 then
a3()
elseif x = 2
a2()
elseif x = 3
a1()
end

u sicko!
Report Abuse
seblind is not online. seblind
Joined: 10 Aug 2011
Total Posts: 91
23 Jun 2015 03:49 PM
@KlinkStudios

Nope .-.
It says 'then' excepter near '='.
Report Abuse
KlinkStudios is not online. KlinkStudios
Joined: 31 Oct 2013
Total Posts: 563
23 Jun 2015 03:52 PM
Didn't you see the mistake? Oh well here:

local X=math.random(1,3)
if X==1 then
a3()
elseif x = 2 then
a2()
elseif x = 3 then
a1()
end

u sicko!
Report Abuse
seblind is not online. seblind
Joined: 10 Aug 2011
Total Posts: 91
23 Jun 2015 03:59 PM
@KlinkStudios

I actually tried that myself before answering, and no, it still doesnt work...
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