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: Works but doesn't work...

Previous Thread :: Next Thread 
freshhotel is not online. freshhotel
Joined: 12 Jun 2012
Total Posts: 827
02 Nov 2015 04:58 AM
So my script works in studio but in play mode it doesn't?
My script is a local script
Also in developer console it said there was an error at line 4 but I don't see any?

local sp = script.Parent


sp.Home.MouseButton1Down:connect(function() -- home function
sp.MainScreen.Visible = true
sp.Changelog.Visible = false
sp.Credits.Visible = false
sp.Color.Visible = false
sp.Parent.Sounds.Click:Play()
end)

sp.MainScreen.Changelog.MouseButton1Down:connect(function() -- Changelog function
sp.MainScreen.Visible = false
sp.Changelog.Visible = true
sp.Credits.Visible = false
sp.Color.Visible = false
sp.Parent.Sounds.Click:Play()
end)

sp.MainScreen.Credits.MouseButton1Down:connect(function() -- open credits function
sp.MainScreen.Visible = false
sp.Changelog.Visible = false
sp.Credits.Visible = true
sp.Color.Visible = false
sp.Parent.Sounds.Click:Play()
end)

sp.MainScreen.Color.MouseButton1Down:connect(function() -- open color function
sp.MainScreen.Visible = false
sp.Changelog.Visible = false
sp.Credits.Visible = false
sp.Color.Visible = true
sp.Parent.Sounds.Click:Play()
end)


-----------------------
-- color functions
sp.Color.Blue.MouseButton1Down:connect(function()
sp.BackgroundColor3 = Color3.new(51/255, 164/255, 234/255)
end)

sp.Color.Green.MouseButton1Down:connect(function()
sp.BackgroundColor3 = Color3.new(23/255, 180/255, 20/255)
end)

sp.Color.Grey.MouseButton1Down:connect(function()
sp.BackgroundColor3 = Color3.new(147/255, 147/255, 147/255)
end)

sp.Color.Pink.MouseButton1Down:connect(function()
sp.BackgroundColor3 = Color3.new(234/255, 35/255, 231/255)
end)

sp.Color.Purple.MouseButton1Down:connect(function()
sp.BackgroundColor3 = Color3.new(90/255, 6/255, 235/255)
end)

sp.Color.Red.MouseButton1Down:connect(function()
sp.BackgroundColor3 = Color3.new(255/255, 0/255, 0/255)
end)

sp.Color.White.MouseButton1Down:connect(function()
sp.BackgroundColor3 = Color3.new(250/255, 250/255, 250/255)
end)

sp.Color.Yellow.MouseButton1Down:connect(function()
sp.BackgroundColor3 = Color3.new(235/255, 235/255, 34/255)
end)
Report Abuse
scottmike0 is not online. scottmike0
Joined: 14 Sep 2008
Total Posts: 1073
02 Nov 2015 05:02 AM
postin code will not solve the problem, ya gotta post what exactly you want it to do with it...

Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
02 Nov 2015 05:35 AM
use waitforchild
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