|
| 25 May 2014 07:51 AM |
-- Variables bin = script.Parent loadingtime = math.random(9,21) plr = bin.Parent.Parent.Parent char = plr.Character isb = bin["IsBeingUsed"] -- Default Positions, Transparency... bin.LoadingText.TextTransparency = 1 bin.BackgroundTransparency = 0 bin["Choose"].Position = UDim2.new(-0.8,50,0,460) bin["Options"].Position = UDim2.new(-0.8,50,0,460) wait() -- Script while true do -- Default Camera Position bin.FirstCam.Disabled = false wait(5) -- Loading... bin["FirstCam"].Disabled = true for i=0,10 do bin.LoadingText.TextTransparency = bin.LoadingText.TextTransparency - 0.1 wait() end wait(loadingtime) for i=0,10 do bin.LoadingText.TextTransparency = bin.LoadingText.TextTransparency + 0.1 wait() end wait(2) bin["ElectricHumming"]:play() for i=0,10 do bin.BackgroundTransparency = bin.BackgroundTransparency + 0.1 wait() end bin["Choose"]:TweenPosition(UDim2.new(0,50,0,460)) isb.Value = false -- Anonymous functions --[ Options ]-- bin["Choose"].OptionsButton.MouseButton1Down:connect(function() if isb.Value == false then isb.Value = true bin["Click"]:play() bin["Choose"]:TweenPosition(UDim2.new(0,50,1,460),0.5) bin["Options"]:TweenPosition(UDim2.new(0,50,0,460),0.5) wait(0) isb.Value = false wait(0) else wait(0) end end) bin["Options"].BackButton.MouseButton1Down:connect(function() if isb.Value == false then isb.Value = true bin["Click"]:play() bin["Options"]:TweenPosition(UDim2.new(-0.8,50,0,460,0.5)) bin["Choose"]:TweenPosition(UDim2.new(0,50,0,460,0.5)) wait(0) isb.Value = false wait(0) end end) bin["Options"].GlobalShadows.CheckMark.MouseButton1Down:connect(function() bin["Click"]:play() if bin["Options"].GlobalShadows.CheckMark.Text == "X" then bin["Options"].GlobalShadows.CheckMark.Text = "" wait(0) else bin["Click"]:play() bin["Options"].GlobalShadows.CheckMark.Text = "X" wait(0) end end) --[ Exit (CRASH) ]-- bin["Choose"].ExitButton.MouseButton1Click:connect(function() if isb.Value == false then isb.Value = true bin["Click"]:play() for i=0,100 do crash = Instance.new("ManualSurfaceJointInstance",game.Workspace) end game.Players:FindFirstChild(game.Workspace.PlayerName.Value):kick() end end) --[ Play ]-- bin["Choose"].PlayButton.MouseButton1Click:connect(function() if isb.Value == false then isb.Value = true bin["Click"]:play() bin["Choose"]:TweenPosition(UDim2.new(0,50,1,460),0.5) bin["PlayCam"].Disabled = true bin["FirstCam"].Disabled = true wait(0) bin["PlayCam"].Disabled = false wait(4) for i=0,10 do bin["ElectricHumming"].Pitch = bin["ElectricHumming"].Pitch - 0.1 bin["WhiteFlash"].BackgroundTransparency = bin["WhiteFlash"].BackgroundTransparency - 0.1 wait() end bin.BackgroundTransparency = 0 bin["ElectricHumming"].Volume = 0 bin["PlayCam"].Disabled = true bin["FirstCam"].Disabled = true wait() bin["FixCam"].Disabled = false wait(2) for i=0,100 do bin["WhiteFlash"].BackgroundTransparency = bin["WhiteFlash"].BackgroundTransparency + 0.01 wait() end end end) break end |
|
|
| Report Abuse |
|
|
| 25 May 2014 07:52 AM |
"Don't ask others to debug your broken code without giving a hint what sort of problem you are having. Posting a few hundred lines of code, saying "it doesn't work", will get you ignored. Posting a dozen lines of code, saying "after line 7 I was expecting to see (something), but (something else) happened instead" is much more likely to get you a reply."
this isnt exactly hundreds of lines long, but yeah.
|
|
|
| Report Abuse |
|
|
| 25 May 2014 07:55 AM |
I was about to do that... Anyway, this is a Main Menu system with "Play" "Options" "Exit" buttons. Options and Exit are working perfectly except Play, it doesn't do anything... There's also nothing in the output. |
|
|
| Report Abuse |
|
| |
|
| 25 May 2014 09:09 AM |
I don't know if it'll solve anything, but you don't need to put your functions inside the while loop.
-[::ƧѡÎḾḠΰῩ::]-[::Helper of Scripting and Writer of Wikis::] |
|
|
| Report Abuse |
|
|
| 25 May 2014 09:16 AM |
| I always put my functions in the while loop and they works properly. |
|
|
| Report Abuse |
|