Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why are my Intro GUIs not functioning?

Asked by 9 years ago

Alright, so for my level, The Infinite Battlegrounds I am completely stumped. I am only a beginner level scripter and I am not sure what to change or fix. My level has a series of ScreenGUIs and they are supposed to be advanced through via a button. However, I cannot get the GUIs to disappear. It will display the title and a next button to start, next will be 3 images of each of the teams which will be click-able, then four more images will appear from there that are their character classes, then it will load them in the game based on that. I currently have it set up so that I have under StarterGui, ScreenGui, and a Frame (renamed Holder). Inside of the Holder I have a NumberValue and another Frame (renamed Container). Inside the Container I have a TextButton (renamed Next) and a TextBox. I was setting it up so that when the NumberValue was a certain number, that would then trigger which GUIs would be visible on the screen. So it starts at one, which is the title screen. When the button Next is clicked, it should change the value of the NumberValue to 2 and thus make the GUIs disappear with another little string of code. That would then trigger the next set of GUIs and so on throughout my whole little thing. So here is the code I have assembled so far. Keep in mind I am only a beginner and I honestly have no idea what I am doing. I hope that I am at least in the ballpark here. If anything is unclear, please ask and I shall do my best to clarify. I have not fully put together the other GUIs yet.


button = script.Parent window = script.Parent.Parent.Parent.Parent Container = script.Parent.Parent.Container local Slide = script.Parent.Parent.Parent.Number function onClick() if Slide.Value < 2 then Slide.Value = 2 wait(1) end function onClicked() window:remove() end end script.Parent.MouseButton1Click:connect(onClicked)
0
In future, can you put your code within the code block - Makes it easier to read :) Uroxus 350 — 9y
0
Oh dang. Here, let me fix that. Thanks for the warning! Malefactus 55 — 9y

Answer this question