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
 

Re: What's wrong with this?

Previous Thread :: Next Thread 
TheLuaUser is not online. TheLuaUser
Joined: 22 May 2012
Total Posts: 1405
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
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
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
TheLuaUser is not online. TheLuaUser
Joined: 22 May 2012
Total Posts: 1405
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
TheLuaUser is not online. TheLuaUser
Joined: 22 May 2012
Total Posts: 1405
25 May 2014 08:49 AM
Are you there people?
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
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
TheLuaUser is not online. TheLuaUser
Joined: 22 May 2012
Total Posts: 1405
25 May 2014 09:16 AM
I always put my functions in the while loop and they works properly.
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