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: After Intro Button [Please help me.]

Previous Thread :: Next Thread 
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
10 Apr 2013 07:31 PM
Ok, so I made an Intro work, but when the button appears, and I click it, it doesn't destroy the Intro and Cutscene, and it doesn't make the game classes appear visible! Please help me! Heres the script:

local Screen = script.Parent
local Config = Screen.Config
local Filter = Screen.Filter
local Content = Screen.Content

function FilterFade(start,finish,step)
for i = start,finish,0.03/step do
Filter.BackgroundTransparency = i
wait()
end
Filter.BackgroundTransparency = finish
end

Filter.Visible = true
for _,image in pairs(Content:GetChildren()) do image.Visible = false end
wait(Config.Padding_Time.Value)
for _,image in pairs(Content:GetChildren()) do
image.Visible = true
FilterFade(0,1,Config.Fade_Time.Value)
wait(Config.Display_Time.Value)
FilterFade(1,0,-Config.Fade_Time.Value)
image.Visible = false
wait(Config.Display_Time.Value)
end
wait(Config.Padding_Time.Value)
Screen.Background.Visible = false
FilterFade(0,1,Config.Fade_Time.Value)



wait(0.5)



script.Parent["Enter"].Visible = true







local target = workspace.IntCam.Head
local camera = workspace.CurrentCamera
camera.CameraSubject = target
local angle = 5

while wait() do
camera.CoordinateFrame = CFrame.new(target.Position)
* CFrame.Angles(0,angle,0)
* CFrame.new(0,0,-30)
angle = angle + math.rad(.3)

end





local button = script.Parent.Enter

button.MouseButton1Click:connect(function()

wait(0.05)
script.Parent:Destroy()
wait(0.05)
script.Parent.Parent["Pick Class"].Frame.Visible = true

end)
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
10 Apr 2013 07:34 PM
Anyone? Hmph.... *Sigh*
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
10 Apr 2013 07:37 PM
*Sigh* Bump :(
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
10 Apr 2013 07:40 PM
Really..... Bump
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
10 Apr 2013 07:42 PM
Why doesn't anyone help specificly 'me' anymore? Its like I'm gone... q-q
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
10 Apr 2013 07:47 PM
Sorry if you feel ignored, I don't think anyone's specifically ignoring you, as much as not being able to figure out why this won't work.
But I can tell you your first problem, you have script.Parent:Destroy(), then you try to access script.Parent.Parent. When you destroy it, it's parent is set to nil, and it becomes unusable.
Try fixing this
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
10 Apr 2013 07:50 PM
So if I put the following, it will work maybe?



local button = script.Parent.Enter

button.MouseButton1Click:connect(function()

wait(0.05)
script.Parent.Parent["Pick Class"].Frame.Visible = true
wait(0.05)
script.Parent:Destroy()

end)
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
10 Apr 2013 07:52 PM
It should. But if you would like it to destroy first, you could turn script.Parent.Parent into a variable before destroying script.Parent
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
10 Apr 2013 07:54 PM
Ugh, well I switched it but it seems to not destroy everything, nor make the frame Visible from another GUI. Ugh, im just wondering becuase I've tried several strategys and they dont seem to work.

If you know, please modify the bottom part (This part of the script):


local button = script.Parent.Enter

button.MouseButton1Click:connect(function()

wait(0.05)
script.Parent.Parent["Pick Class"].Frame.Visible = true
wait(0.05)
script.Parent:Destroy()

end)
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
10 Apr 2013 07:56 PM
is Pick Class visible?
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
10 Apr 2013 07:57 PM
Until the button is clicked, it is not.

It should turn visible after, but it doesn't. Nothing happens. q-q
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
10 Apr 2013 07:58 PM
You have ["Pick Class"].Frame.Visible = true, but if the frame's parent is not visible, it's not going to show up.
Report Abuse
dnic1997 is not online. dnic1997
Joined: 08 May 2010
Total Posts: 309
10 Apr 2013 07:58 PM
Do you want "Pick Class" to also be destroyed?
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
10 Apr 2013 08:00 PM
Then how will I get it so that when the button is clicked, it will make the Pick Class>Frame>Visible = True?
Report Abuse
dnic1997 is not online. dnic1997
Joined: 08 May 2010
Total Posts: 309
10 Apr 2013 08:03 PM
Well, what he asked is: Is "Pick Class" a frame that is invisible or is it also a ScreenGUI?
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
10 Apr 2013 08:03 PM
local spp = script.Parent.Parent["Pick Class"]
spp.Visible,spp.Frame.Visible = true,true
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
10 Apr 2013 08:05 PM
Oh! Pick Class is the ScreenGUI, the Frame is the Obvious Frame. xD
Report Abuse
dnic1997 is not online. dnic1997
Joined: 08 May 2010
Total Posts: 309
10 Apr 2013 08:06 PM
If you just want to use a different method, you could just:

Put the "Pick Class" GUI inside of the lighting then clone it into the player's PlayerGUI when the time comes.
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
10 Apr 2013 08:07 PM
Pick Class is a ScreenGui? Ohhhhhhh! That would make script.Parent.Parent the PlayerGui. o:
Der... I would destroy it afterward, 'cause it looks like destroying a script's parent acts like calling the error() function :3
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
10 Apr 2013 08:07 PM
D: Even when I edited what you gave me into the script, it still wouldn't work!
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
10 Apr 2013 08:08 PM
Go in offline solo, and look at the output
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
10 Apr 2013 08:10 PM
BTW, this script is in a Different Screen GUI. It goes like this:

>StarterGUI

>>Pick Class


>>Intro
>>>Program (The Script)
>>>Background
>>>Content
>>>Filter
>>>Enter (The Button to be pressed)
>>>Config (It just has fades)

Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
10 Apr 2013 08:11 PM
'Go in offline solo, and look at the output'

I test my scripts in Offline Solo (Wich is Tools>Test>Play Solo I suppose), and it doesn't seem to work.
Report Abuse
dnic1997 is not online. dnic1997
Joined: 08 May 2010
Total Posts: 309
10 Apr 2013 08:12 PM
Not going to put where "Frame" is located?
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
10 Apr 2013 08:14 PM
Oh! Sorry here:



>StarterGUI

>>Pick Class
>>>Frame


>>Intro
>>>Program (The Script)
>>>Background
>>>Content
>>>Filter
>>>Enter (The Button to be pressed)
>>>Config (It just has fades)
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