Im having problems replicating the ButtonScript and I get errors and I think Im doing something wrong. And then also the Camera part doesnt have errors but when I did my first playtest I spawned automatically with my camera on me and not at the CameraPart. can you help these two problems?
-- Animation Script local tweenService = game:GetService("TweenService") local tweenInfoButtons = TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut) for i, v in pairs(script.Parent:GetChildren()) do if v:IsA("Frame") then v.MouseEnter:Connect(function() tweenService:Create(v, tweenInfoButtons, {BackgroundColor3 = Color3.fromRGB(40, 40, 40)}):Play() end) v.MouseLeave:Connect(function() tweenService:Create(v, tweenInfoButtons, {BackgroundColor3 = Color3.fromRGB(30, 30, 30)}):Play() end) end end -- Buttons Script local tweenInfoPopups = TweenInfo.new(1,Enum.EasingStyle.Quad, Enum.EasingDirection.InOut) local Popup = {
Settings = "Settings" Credits = "Credits"
} for buttonName, frame in paris(Popup) do local button = script.Parent:FindFirstChild(buttonName) local popupframe = script.Parent.Parent.Popups:FindFirstChild(Popup)
button:WaitForChild("TextButton").MouseButton1Click:Connect(function() for i, v in pairs(script.Parent:GetDescendants())do if v:Isa("TextButton") then v.Visible = false end end
for i, x in pairs (script.Parent.Parent.Popups:GetChildren()) do if x:IsA("Frame") then x.Visible = false x.Position = UDim2.new(0.5,0,1.5,0) end end
Popup.Visible = true tweenService:Create(popupframe, tweenInfoPopups, {Position = UDim2.new(.5,0,.5,0)}):play() end end -- {0.5, 0},{0.777, 0} Buttons Position -- {0.5, 0},{0.26, 0} Naruto vs Luffy
thanks for the tutorial! used this myself. had to change some of the code a little as i did a few things different but i figured it out and it works perfectly!
This tutorial was very helpful! It’s very easy to understand and very efficient. The only thing that’s bugging me if when you try and click “back” it doesn’t work, and when you click play the transition doesn’t play and the screen just stays black
man's voice is so deep...but thank you for the tutorial, this really elevates the game. no one else does and explains it like you did, precise, to the point, and easy while still making the game really good. :)
for anybody struggling like me here was the script for the buttonsScript: --Animation Script local tweenService = game:GetService("TweenService") local tweenInfoButtons = TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut) for i, v in pairs(script.Parent:GetChildren())do if v:IsA("Frame")then v.MouseEnter:Connect(function() tweenService:Create(v, tweenInfoButtons, {BackgroundColor3 = Color3.fromRGB(40,40,40)}):Play() end)
v.MouseLeave:Connect(function() tweenService:Create(v, tweenInfoButtons, {BackgroundColor3 = Color3.fromRGB(30,30,30)}):Play() end) end end
for buttonName, frameName in pairs(Popup) do local button = script. Parent: FindFirstChild(buttonName) local popupframe = script.Parent. Parent. Popups: FindFirstChild(Popup) button:WaitForChild( "TextButton*). MouseButton1Click:Connect (function( ) for i, v in pairs(script.Parent :GetDescendants )) do if V: ISA "TextButton) then v. Visible = false end Y end tweenService:Create(script.Parent, tweenInfoPopups, {Position = UDim2. new(0.5,0,1.25,0)] ):Play() tweenService:Create(script.Parent.Parent.Title, tweenInfoPopups, {Position = UDim2.new(0.5,0, -1.25, 0)]):Play () for i, x in pairs script.Parent. Parent. Popups :GetChildren do if x:IsA("Frame") then x.Visible = false x.Position = UDim2.new(0.5,0,1.5,0) end end popupframe. Visible = true tweenService:Create(popupframe, tweenInfoPopups, {Position = UDim2. new(.5,0, .5,0)]) :Play() end)
its so good man it helped me made a good game i got a few bucks out if it thanks now i know the hard way to make the gui better [from all my heart i love u man]
For anyone haveing a WaitForChild error at line 33 in your button script her is how you fix it. Bc i got stuck on it for four hours last night and i just fixed it this morning 1. check that your pop up frame and your button have the exact same name example would be: Button name: Settings, so your popup name has to be exactly the same witch would be Settings (yes capatals and punctuation and spelling errors effect this so make sure its like exactly the same) 2. after you have done number one make sure before every IsA is a : not a . it makes an error at witchever line it is in for this code it would be lines 35, and 44, make sure to check every script for it too. Next error. So after fixing the wait for child nil you might only be able to press your buttons once and the popup wont work if you press it again after going back or hitting on and off to turn your shadows off or on . if you cant press the "Settings" button then you have an error in your back button scrip. and if you cant press your "shadow toggle" more then once then your shadow button script has an error 1. fix back button. So my script for the back button looked like (also this is in the Localscript used to code back and not in button script) local tweenService = game:GetService("TweenService") local tweenInfoPopups = TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut) script.Parent.TextButton.MouseButton1Click:Connect(function() script.Enabled = false
so what i had done wrong is the "for i, v in pairs(script.Parent:getDescendants()) do" was not add the correct code witch was supposed to be : for i, v in pairs(script.Parent.Parent.Parent.Parent.Buttons:GetDescendants()) do and the second error was "v.Visible = false" just change "false" to true if your's does not look like that and your having trouble look at the video at the time 20:14 2. if you are having trouble with shadows and it looked like this script.Parent.TextButton.MouseButton1Click:Connect(function() if script.Parent.StateValue.Value == true then game.Lighting.GlobalShadows = false
script.Parent.State.Text = "ON" end end) you are missing the line script.Parent.StateValue.Value = false so just add it in to make it (the place would be under "game.Lighting.Global.Shadows = false" script.Parent.TextButton.MouseButton1Click:Connect(function() if script.Parent.StateValue.Value == true then game.Lighting.GlobalShadows = false script.Parent.StateValue.Value = false
script.Parent.State.Text = "ON" end end) Edit: if your shadows wont turn on its because i messed up "game.Lighting.GlobalShadows = false" after else should be "game.Lighting.GlobalShadows = true" again if you are having any other issues with shadows then look at the video at the time 14:56 thankyou i hope this helped with anybody who had any of these errors best of luck to all
@@RF24LUKAKU I would just check the script again and make sure there aren’t minor mistakes like periods or Colin’s being in the wrong place that also goes with spelling like capitalization and make sure there are now spaces in your words if your have spaces in them example would be : camera part -> camerapart, reason being is the code won’t work if it’s two words. But other then that I don’t know how to help because didn’t get an error for my camera I’m sorry I wasn’t able to dissect the exact issue but it’s usually spelling of minor punctuation errors
i stil got the "waitForChild" error, it says attempt to index nil with "waitforchild". and i checked what u said, but i still got the same error. I have checked and rewriten the code 2 times alr, i am pretty sure its something else. I would appreiate it if u could help me. Thank you,
I spent more than 5 hours making it and it ended up not working, so I decided to go to the game in your desc and I found the main menu thing there so I downloaded it and put it in my game and it works now 😂, thanks, but you should’ve made it more clear that in the game it will give you everything you need , but thanks anyways, earned a like and a subscriber ❤❤
Same thing happened and reading this I'm becoming a bit demotivated but I have to learn how to do it BC if I don't I can't update the game in future independently
i just now used the free model version you have on patreon to see whats wrong and instead of switching to the main menu camera it just pauses mid air where the player controller is although it switches back to the player when you click play
i have a problem, when i first playtested my game, the camera for the menu still follows my character, it wont stay on the camera that you put at the making the camera part of your video,pls help me
Hi, i've got a problem with Line 33. The Output says that it's "trying to index nil with 'WaitForChild'. Does anybody know how to fix that? Edit: Nevermind, I got it myself! Edit 2: Now I got another problem, the Back-Button isn't responding, I checked all the Names in the Explorer and the script but there is still nothing happening. Can someone help me out?
Hey bro can you help me? I follow your script it works, but when i click on settings it shows but when i click on shadows it doesnt work even the back buttons
This tutorial was AMAZING! It worked well despite possibly being outdated for me. The only things I’d change myself would be 1. Instead of being put straight into the game after pressing play, you have a menu prompt asking which side/team you want to be on (like jailbreak when you choose to be a cop or criminal) 2. Just the way the settings menu was set up. Other than those, I loved this tutorial! Definitely beginner friendly. Oh, and one last thing to say, whenever I was going through the tutorial, I ran into a problem where when I clicked on the settings/credits button then backed out of it, I couldn’t click any buttons (other than the Roblox studio ones) after that and I’d love if someone could help me fix it
thx so much dude, just what i needed! this is a breath of fresh air, instead of just linking a pre-made model in the description, you actually walk us through the process! the editing is lovely too! 🤍
Hello, i have a problem, after i test the game, not even a single button works when i click on it, and on the output, it says "Players.kfzma02.PlayerGui.MenU.Main Framer.Buttons.ButtonScript:25: Expected ',' after table constructor element
I think you could add a "," in line 25, it can literally destroy your entire script. I've had similar Problems, try finding differences between your script and then one shown in the Video
Great Video! Only thing is I'm having issues with the Camera for the background following the player instead of the set spot. I moved the camera part out of the folder and altered the script but the camera still follows the player. I'm also having major issues with the GUI such as {Settings} and {Credits} not loading when you click them, which means the animations aren't showing up. I've checked over all the scripts to make sure they're the correct scripts and they are. I'm super new to scripting and don't know what's wrong so if you have a explanation on how to fix this would be great!
I had this issue and here the solution I found so when you are writing your camera script the WaitForChild(“”) is each folder so when you go to look for the part make sure to include each folder it should look like this when you are finished: local CameraPart = workspace:WaitForChild(“MenuFolder”):WaitForChild(“MenuCamera”):WaitForChild(“MenuCameraPart”).CFrame
im on the making the buttons step and whenever i try to move the duplicated title its only moves the text label not the whole thing, but when i move the rectangle while the text is moved elsewhere they both move
I am a bit confused so could you indentify the problem? It says that The MouseButton1Click is not a valid member of TextLabel "Players.Legitsadnessx.PlayerGui.MenuGui.MainFrame.Popups.Credits.Back.Textbutton. i am only including credits and i accidentally made all textbuttons textlabels. Any idea on how to fix this?
Excellent tutorial! I have never been good at figuring out how to design/script UIs so your video really helped me. Not sure if this was a recent change or not but I know that as of now you want to use task.wait() instead of wait() but other than that great tutorial!
Sorry for the late comment, I really appreciated the tutorial, I haven't done a lot of scripting but this helped me out a ton!! I do have a quick question, I have a loading Animation and I want this main menu to be hidden until the loading animation is complete, how can I do this?
Bro. I can't believe this coincidence. I wanted to make a main menu. On I searched it up on RUclips and found Ur old video. I was watching it when I found this videos link in that videos pinned comment. And as I clicked it. I am here. AND THE VIDEO IS UPLOADED 12 MINUTES AGOOOO??
Thank you for this tutorial, but i got a problem here, i checked my output to see any errors for the scripts because after i pressed the back button on credits or settings the buttons all just dissapeared. The output said nothing is wrong, can you please tell me what's wrong though? Thanks!
To anyone who's camera is not locking in place like his during the first playtest, i fixed my problem by putting the camerascript inside starterplayerscripts
I have a problem. when I click on any button of the tree nothing happens. I tried to read the script again but nothing is wrong and no error is showing up on the console log. Can someone help me cuz I rly want to make my game
at 7:43 It says to change the model streaming mode to persistent, but all it has for me is default, improved, and legacy. Which one do I need to choose?
for the button animation= local tweenService = game:Getservice("TweenService") local tweenInfoButtons = TweenInfo.new(0.25 Enum.Easingstyle.Quad, Enum.EasingDirections.InOut) for i, v in pairs (script.Parent:GetChrildren()) do if v:IsA("Frame") then v.MouseEnter:connect(function() tweenService:create(v, tweenInfoButtons, :Backroundcolor3 = Color3.fromRGB(40,40,40)}) end)
v.MouseLeave:Connect(function() tweenService:create(v, tweenInfoButtons, :Backroundcolor3 = Color3.fromRGB(40,40,40)}) end) end end
local tweenService = game:GetService("TweenService") local tweenInfoButtons = TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut) for i, v in pairs(script.Parent:GetChildren()) do if v:IsA("Frame") then v.MouseEnter:Connect(function() tweenService:Create(v, tweenInfoButtons, {BackgroundColor3 = Color3.fromRGB(40, 40, 40)}):Play() end) v.MouseLeave:Connect(function() tweenService:Create(v, tweenInfoButtons, {BackgroundColor3 = Color3.fromRGB(255, 255, 255)}):Play() end) end end
I do have a question about the button script. As soon as I start the second test, an error message appears. How to solve it? error message -> Players.PlayerName.PlayerGui.Menu.MainFrame.Buttons.ButtonScript:30: attempt to index nil with 'WaitForChild'
after i finished scripting the popups, i playtested to find it starting on the credits gui, and after hitting back to the main menu to test out settings and credits, the menu rises up without turning invisible and the credits/settings menu doesnt even appear
I have the exact same problem, except kidna different, when I click on the credits button, the title and buttons goes out of the screen but the popups dont appear
Why do i get this error in this line? Error: CameraScript is not a valid member of ScreenGui "Players.johnnycat2010.PlayerGui.CameraScript" Line: script.Parent.Parent.Parent.CameraScript.Enabled = false
so i checked the output and there are no errors but my button script for the setting is no working and i followed the video very closely and it still did not work
now i have got a new problem, when i click a buttonlike sttings or credits, none of the buttons work after, and my start button doesnt work at all for some reason
There's a visual glitch when I add a Studio Spawn Point. The MenuCameraPart is facing two walls and some props as a loading screen, which disappear if the Spawn Point is on the map. No Output errors!
I've checked output and it keeps saying TextButton is not a valid member of Frame UPDATE: alr so im pretty sure I just forgot to add the textbutton in but afterwards another part of my gui had issues with a textbutton, uniquely naming all of them seemed to fix the issue I do still have an issue in my buttonscripts though, it keeps popping up with invalid arguement #1 to pairs UPDATE #2: My local popup on buttonscript 22 was misspelt, I've gotten a new error on ButtonScript 33: attempt to index nil with 'WaitForChild' UPDATE #3: I ended up checking the naming scheme of my frames and noticed I named my settings improperly, renaming them fixed the index nil issue. Afterwards, I ended up getting an infinite yield warning which I managed to fix by reverting every unique name I reserved for my textbuttons. UPDATE #4: Hopefully the last error. I've made it to the play script section but the 80th buttonscript has created another error: " Expected , got 'end' - Studio - ButtonScript:80"
No one gonna mention how beautiful the baseplate and lighting is? ANYWAYS, could you please give us a mini tutorial on the lighting settings and properties
-- Buttons script local tweenInfoPopups = TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut) local Popup = {
Settings = "Settings", Credits = "Credits"
} for buttonName, frameName in pairs(Popup) do local button = script.Parent:FindFirstChild(buttonName) local popupframe = script.Parent.Parent.Popups:FindFirstChild(frameName)
button:WaitForChild("TextButton").MouseButton1Click:Connect(function() for i, v in pairs(script.Parent:GetDescendants()) do if v:IsA("TextButton") then v.Visible = false end end
ive wanted to delete all of the menu gui , folder .... That tou do in the video but now i can't even move when i'm in roblox studio. Like i can move my camera character but i cannot walk and jump
@Insighted When I make the popups invisible and press "Settings", the settings popup doesn't show but if I make it visible, it works, but it shows in the first place, which makes it not pretty. There are no errors in the scrips or anything though. Please help me :D
Actually nvm thx for the tutorial ❤️ Btw everyone you don’t have to follow this video, just go the main pinned comment and you can download it, it has all the scripts made for you, just customize it your welcome
Everything is working but camera not. When I play the game I will only see the gui (working) but not camera position if you know what I mean. Is there a fix?
question, how do you make the button animations be for a specific button? my play button is a different color than my credits button and i want them to have different color animations
Hey everyone! The updated 2024 Version of this tutorial is out now! ruclips.net/video/m65GWDcHC30/видео.htmlsi=EVpEqiGAKqxzRxXJ
Im having problems replicating the ButtonScript and I get errors and I think Im doing something wrong. And then also the Camera part doesnt have errors but when I did my first playtest I spawned automatically with my camera on me and not at the CameraPart. can you help these two problems?
Im also talking about the button animation script part, not the second part of the script
@@chum333 make sure the camera type in the script is set as scriptable:
Enum.CameraType.Scriptable
@@chum333 Check for spelling problems
-- Animation Script
local tweenService = game:GetService("TweenService")
local tweenInfoButtons = TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
for i, v in pairs(script.Parent:GetChildren()) do
if v:IsA("Frame") then
v.MouseEnter:Connect(function()
tweenService:Create(v, tweenInfoButtons, {BackgroundColor3 = Color3.fromRGB(40, 40, 40)}):Play()
end)
v.MouseLeave:Connect(function()
tweenService:Create(v, tweenInfoButtons, {BackgroundColor3 = Color3.fromRGB(30, 30, 30)}):Play()
end)
end
end
-- Buttons Script
local tweenInfoPopups = TweenInfo.new(1,Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
local Popup = {
Settings = "Settings"
Credits = "Credits"
}
for buttonName, frame in paris(Popup) do
local button = script.Parent:FindFirstChild(buttonName)
local popupframe = script.Parent.Parent.Popups:FindFirstChild(Popup)
button:WaitForChild("TextButton").MouseButton1Click:Connect(function()
for i, v in pairs(script.Parent:GetDescendants())do
if v:Isa("TextButton") then
v.Visible = false
end
end
tweenService:Create(script.Parent, tweenInfoPopups, {Position = UDim2.new(0.5,0,1.25,0)}):Play()
tweenService:Create(script.Parent.Parent.Title, tweenInfoPopups, {Position = UDim2.new(0.5,0,-1.25,0)}):Play()
for i, x in pairs (script.Parent.Parent.Popups:GetChildren()) do
if x:IsA("Frame") then
x.Visible = false
x.Position = UDim2.new(0.5,0,1.5,0)
end
end
Popup.Visible = true
tweenService:Create(popupframe, tweenInfoPopups, {Position = UDim2.new(.5,0,.5,0)}):play()
end
end
-- {0.5, 0},{0.777, 0} Buttons Position
-- {0.5, 0},{0.26, 0} Naruto vs Luffy
Very nice tutorial and right in time for me to create my first game's title screen... Thanks for sharing!
suprisingly, it's such a breath of fresh air to run into a tutorial in which you encounter zero errors and issues, good job man!!
Bro I have like 4 errors
bro the clicking aint clicking
@@the-satire j
Lol that's probably why the music fits in with the no errors
wdym by clicking aint clicking
@@the-satire
thanks for the tutorial! used this myself. had to change some of the code a little as i did a few things different but i figured it out and it works perfectly!
This tutorial was very helpful! It’s very easy to understand and very efficient. The only thing that’s bugging me if when you try and click “back” it doesn’t work, and when you click play the transition doesn’t play and the screen just stays black
man's voice is so deep...but thank you for the tutorial, this really elevates the game. no one else does and explains it like you did, precise, to the point, and easy while still making the game really good. :)
His voice making me calm down fr ❤
for anybody struggling like me here was the script for the buttonsScript:
--Animation Script
local tweenService = game:GetService("TweenService")
local tweenInfoButtons = TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
for i, v in pairs(script.Parent:GetChildren())do
if v:IsA("Frame")then
v.MouseEnter:Connect(function()
tweenService:Create(v, tweenInfoButtons, {BackgroundColor3 = Color3.fromRGB(40,40,40)}):Play()
end)
v.MouseLeave:Connect(function()
tweenService:Create(v, tweenInfoButtons, {BackgroundColor3 = Color3.fromRGB(30,30,30)}):Play()
end)
end
end
TYYYY
Didnt work for me
@UIe785 looks good to me perhaps you have a code that u messed up earlier or later on
yoo thanks so much! I wondered why mine didnt work but i forgot one " "
you're the goat
why do u kinda sound like elon musk
nah i think he sounds more like corpse but with a bit higher pitch i think
ehhhh my friends say i sound like ruben sim
He IS Elon Musk.
@@AsadrithI don’t see it 😭
@@26jdaniels I CAN SEE SOUNDS TOO!!!!
didn't even follow the tutorial i just listened to it in the background because i love your voice and the music is BANGIN
This has two meanings.
@@MilloSonicfr
That's scary
how tf did you follow everything when he says "it should look something like this" and then there is 10 lines of code 💀💀
@@TacowithaZ Just write what u see??
The text part worked very well! I didn't change the size because it's size already fits every device! THANK YOUU!!
You should really share your basplate textures dude cuz they look FIRE
for buttonName, frameName in pairs(Popup) do
local button = script. Parent: FindFirstChild(buttonName)
local popupframe = script.Parent. Parent. Popups: FindFirstChild(Popup)
button:WaitForChild( "TextButton*). MouseButton1Click:Connect (function( )
for i, v in pairs(script.Parent :GetDescendants )) do
if V: ISA "TextButton) then
v. Visible = false
end
Y
end
tweenService:Create(script.Parent, tweenInfoPopups, {Position = UDim2. new(0.5,0,1.25,0)] ):Play()
tweenService:Create(script.Parent.Parent.Title, tweenInfoPopups, {Position = UDim2.new(0.5,0, -1.25, 0)]):Play ()
for i, x in pairs script.Parent. Parent. Popups :GetChildren do
if x:IsA("Frame") then
x.Visible = false
x.Position = UDim2.new(0.5,0,1.5,0)
end
end
popupframe. Visible = true
tweenService:Create(popupframe, tweenInfoPopups, {Position = UDim2. new(.5,0, .5,0)]) :Play()
end)
tysm
In pairs ... GetDescents no is ())?
atleast when u use google lens to copy it try to look if there is any failures
@@blueuniverse7704 I hope this works 💀
I swear man everytime I feel like qutting I always find something new to learn and want to continue thank you :)
I’m trying to make my first Roblox game and I have no idea what I’m doing at all like zero clue and this really helped me
its so good man it helped me made a good game i got a few bucks out if it thanks now i know the hard way to make the gui better [from all my heart i love u man]
For anyone haveing a WaitForChild error at line 33 in your button script her is how you fix it. Bc i got stuck on it for four hours last night and i just fixed it this morning
1. check that your pop up frame and your button have the exact same name example would be: Button name: Settings, so your popup name has to be exactly the same witch would be Settings (yes capatals and punctuation and spelling errors effect this so make sure its like exactly the same)
2. after you have done number one make sure before every IsA is a : not a . it makes an error at witchever line it is in for this code it would be lines 35, and 44, make sure to check every script for it too.
Next error. So after fixing the wait for child nil you might only be able to press your buttons once and the popup wont work if you press it again after going back or hitting on and off to turn your shadows off or on . if you cant press the "Settings" button then you have an error in your back button scrip. and if you cant press your "shadow toggle" more then once then your shadow button script has an error
1. fix back button. So my script for the back button looked like (also this is in the Localscript used to code back and not in button script)
local tweenService = game:GetService("TweenService")
local tweenInfoPopups = TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
script.Parent.TextButton.MouseButton1Click:Connect(function()
script.Enabled = false
tweenService:Create(script.Parent.Parent.Parent.Parent.Buttons, tweenInfoPopups, {Position = UDim2.new(0.5, 0,0.605, 0)}):Play()
tweenService:Create(script.Parent.Parent.Parent.Parent.Title, tweenInfoPopups, {Position = UDim2.new(0.5, 0,0.167, 0)}):Play()
tweenService:Create(script.Parent.Parent, tweenInfoPopups, {Position = UDim2.new(0.5,0,1.5,0)}):Play()
wait(1)
for i, v in pairs(script.Parent:GetDescendants()) do
if v:IsA("TextButton") then
v.Visible = false
end
end
script.Parent.Parent.Visible = false
script.Enabled = true
end)
so what i had done wrong is the "for i, v in pairs(script.Parent:getDescendants()) do" was not add the correct code witch was supposed to be :
for i, v in pairs(script.Parent.Parent.Parent.Parent.Buttons:GetDescendants()) do
and the second error was "v.Visible = false" just change "false" to true
if your's does not look like that and your having trouble look at the video at the time 20:14
2. if you are having trouble with shadows and it looked like this
script.Parent.TextButton.MouseButton1Click:Connect(function()
if script.Parent.StateValue.Value == true then
game.Lighting.GlobalShadows = false
script.Parent.State.Text = "OFF"
else
game.Lighting.GlobalShadows = false
script.Parent.StateValue.Value = true
script.Parent.State.Text = "ON"
end
end)
you are missing the line
script.Parent.StateValue.Value = false
so just add it in to make it (the place would be under "game.Lighting.Global.Shadows = false"
script.Parent.TextButton.MouseButton1Click:Connect(function()
if script.Parent.StateValue.Value == true then
game.Lighting.GlobalShadows = false
script.Parent.StateValue.Value = false
script.Parent.State.Text = "OFF"
else
game.Lighting.GlobalShadows = false
script.Parent.StateValue.Value = true
script.Parent.State.Text = "ON"
end
end)
Edit: if your shadows wont turn on its because i messed up "game.Lighting.GlobalShadows = false" after else should be "game.Lighting.GlobalShadows = true"
again if you are having any other issues with shadows then look at the video at the time 14:56
thankyou i hope this helped with anybody who had any of these errors best of luck to all
can u help when i did it it doesnt spawn the part for the camera
@@RF24LUKAKU I would just check the script again and make sure there aren’t minor mistakes like periods or Colin’s being in the wrong place that also goes with spelling like capitalization and make sure there are now spaces in your words if your have spaces in them example would be : camera part -> camerapart, reason being is the code won’t work if it’s two words. But other then that I don’t know how to help because didn’t get an error for my camera I’m sorry I wasn’t able to dissect the exact issue but it’s usually spelling of minor punctuation errors
It really helped but my popups dont pop up
you are my hero tysm
i stil got the "waitForChild" error, it says attempt to index nil with "waitforchild". and i checked what u said, but i still got the same error. I have checked and rewriten the code 2 times alr, i am pretty sure its something else. I would appreiate it if u could help me. Thank you,
Thank you! you've made the graphics this time better and readable! Keep it up!
I spent more than 5 hours making it and it ended up not working, so I decided to go to the game in your desc and I found the main menu thing there so I downloaded it and put it in my game and it works now 😂, thanks, but you should’ve made it more clear that in the game it will give you everything you need , but thanks anyways, earned a like and a subscriber ❤❤
how can i add it?
Bruh
Same thing happened and reading this I'm becoming a bit demotivated but I have to learn how to do it BC if I don't I can't update the game in future independently
Thank you so much bro!! I've been searching for this tutorial for about 2 month
Thank you so much for this tutorial! It was extremely helpful and will kickstart my new game creations! Thank you Asradith!
Love it! Thank You so much
great tutorial I admire how you heart all of your comments keep up the good content man
Thanks for making this video, I am gonna build upon it since I will be using this for a game in the making.
Danngggg!!! These Are FIREE!!!!
Thank you! this helped me fix the camera glitch.
my game uses a custom startercharacter controller thingamabopper so its messes with the camera script very easily and idrk how to fix it
i just now used the free model version you have on patreon to see whats wrong and instead of switching to the main menu camera it just pauses mid air where the player controller is
although it switches back to the player when you click play
i have a problem, when i first playtested my game, the camera for the menu still follows my character, it wont stay on the camera that you put at the making the camera part of your video,pls help me
The menu folder is what's causing the issue. Go into the the Camera script and delete The menu portion on line 5.
@@1914boogey like the whole line or just delete the word menu?
it works perfectly, thank so much for the tutorial!
Hi, i've got a problem with Line 33. The Output says that it's "trying to index nil with 'WaitForChild'. Does anybody know how to fix that?
Edit: Nevermind, I got it myself!
Edit 2: Now I got another problem, the Back-Button isn't responding, I checked all the Names in the Explorer and the script but there is still nothing happening. Can someone help me out?
I fixed it but now the button is just like not working. I click one of the buttons and it just doesnt do a animation or show the popup. any fix?
Had the same thing, I don’t know why that is happening
Bro, you are the best
Shadow script
script.Parent.TextButton.MouseButton1Click:Connect(function()
if script.Parent.StateValue.Value == true then
game.Lighting.GlobalShadows = false
script.Parent.StateValue.Value = false
script.Parent.State.Text = "OFF"
else
game.Lighting.GlobalShadows = true
script.Parent.StateValue.Value = true
script.Parent.State.Text = "ON"
end
end)
Thank you daddy
Tysm!
@@__-om1pj Bro freaky 😭😭😭😭😭😭😭
grind is real
Hey bro can you help me? I follow your script it works, but when i click on settings it shows but when i click on shadows it doesnt work even the back buttons
This tutorial was AMAZING! It worked well despite possibly being outdated for me. The only things I’d change myself would be
1. Instead of being put straight into the game after pressing play, you have a menu prompt asking which side/team you want to be on (like jailbreak when you choose to be a cop or criminal)
2. Just the way the settings menu was set up.
Other than those, I loved this tutorial! Definitely beginner friendly. Oh, and one last thing to say, whenever I was going through the tutorial, I ran into a problem where when I clicked on the settings/credits button then backed out of it, I couldn’t click any buttons (other than the Roblox studio ones) after that and I’d love if someone could help me fix it
how did u get ur buttons to even press? my popups dont show up lol
thx so much dude, just what i needed! this is a breath of fresh air, instead of just linking a pre-made model in the description, you actually walk us through the process! the editing is lovely too! 🤍
Hey can you help me? mine wont work for some reason
Hello, i have a problem, after i test the game, not even a single button works when i click on it, and on the output, it says "Players.kfzma02.PlayerGui.MenU.Main Framer.Buttons.ButtonScript:25: Expected ',' after table constructor element
I think you could add a "," in line 25, it can literally destroy your entire script. I've had similar Problems, try finding differences between your script and then one shown in the Video
best tutorial i found! all the other ones i looked that i lost my mind on.😁but this one was so clean, and perfect. excellent tutorial!
Great Video! Only thing is I'm having issues with the Camera for the background following the player instead of the set spot. I moved the camera part out of the folder and altered the script but the camera still follows the player. I'm also having major issues with the GUI such as {Settings} and {Credits} not loading when you click them, which means the animations aren't showing up. I've checked over all the scripts to make sure they're the correct scripts and they are. I'm super new to scripting and don't know what's wrong so if you have a explanation on how to fix this would be great!
rewrite the script and do the camera part troubleshooting
@@Asadrith what do you mean
@@Asadrithplease reply 😭
I had this issue and here the solution I found so when you are writing your camera script the WaitForChild(“”) is each folder so when you go to look for the part make sure to include each folder it should look like this when you are finished:
local CameraPart = workspace:WaitForChild(“MenuFolder”):WaitForChild(“MenuCamera”):WaitForChild(“MenuCameraPart”).CFrame
If that’s confusing just lmk
im on the making the buttons step and whenever i try to move the duplicated title its only moves the text label not the whole thing, but when i move the rectangle while the text is moved elsewhere they both move
I am a bit confused so could you indentify the problem? It says that The MouseButton1Click is not a valid member of TextLabel "Players.Legitsadnessx.PlayerGui.MenuGui.MainFrame.Popups.Credits.Back.Textbutton. i am only including credits and i accidentally made all textbuttons textlabels. Any idea on how to fix this?
i am also getting this problem
@@HadesZaVFX its probably cause you dont have the script in the correct area.
Excellent tutorial! I have never been good at figuring out how to design/script UIs so your video really helped me. Not sure if this was a recent change or not but I know that as of now you want to use task.wait() instead of wait() but other than that great tutorial!
task.wait() is a more optimised and new version of wait()
Sorry for the late comment, I really appreciated the tutorial, I haven't done a lot of scripting but this helped me out a ton!! I do have a quick question, I have a loading Animation and I want this main menu to be hidden until the loading animation is complete, how can I do this?
change the DisplayOrder on the screengui of your loading gui
Thanks for the quick reply!!!
Thanks for your help! Because the menu needs to be start menu! U deserve a new sub!
Bro. I can't believe this coincidence. I wanted to make a main menu. On I searched it up on RUclips and found Ur old video. I was watching it when I found this videos link in that videos pinned comment. And as I clicked it. I am here. AND THE VIDEO IS UPLOADED 12 MINUTES AGOOOO??
skull
same. not 12 minutes but within the hour
amazing work man...really helped me out alot.
edit: i fixed all the stuff i needed to
😋
Thank you for this tutorial, but i got a problem here, i checked my output to see any errors for the scripts because after i pressed the back button on credits or settings the buttons all just dissapeared. The output said nothing is wrong, can you please tell me what's wrong though? Thanks!
check your tweens, you could probably have something not tweening a frame to the correct position
To anyone who's camera is not locking in place like his during the first playtest, i fixed my problem by putting the camerascript inside starterplayerscripts
how?
didnt work
Nice, but I’m more interested in loading screens, I’m trying to focus more on that, please make a tutorial on the loading screen please :)
already done that
ruclips.net/video/9spESsKwH30/видео.htmlsi=UOSxySdizfNma5OR
ruclips.net/video/r9LkulsRYlM/видео.htmlsi=esEq-vBy4YWf8nfB
I have a problem. when I click on any button of the tree nothing happens. I tried to read the script again but nothing is wrong and no error is showing up on the console log. Can someone help me cuz I rly want to make my game
thanks so much bro! love u and giving you credit for your immense help (:
at 7:43 It says to change the model streaming mode to persistent, but all it has for me is default, improved, and legacy. Which one do I need to choose?
ya gotta model the camera you spawned with the script which is inside the folder, then go to behavior and change it to persistent.
Finished the tutorial and it all works perfectly!
Really needed it to my upcoming game!!
where you in a hurry?
Thank you so muchi!!!
for the button animation= local tweenService = game:Getservice("TweenService")
local tweenInfoButtons = TweenInfo.new(0.25 Enum.Easingstyle.Quad, Enum.EasingDirections.InOut)
for i, v in pairs (script.Parent:GetChrildren()) do
if v:IsA("Frame") then
v.MouseEnter:connect(function()
tweenService:create(v, tweenInfoButtons, :Backroundcolor3 = Color3.fromRGB(40,40,40)})
end)
v.MouseLeave:Connect(function()
tweenService:create(v, tweenInfoButtons, :Backroundcolor3 = Color3.fromRGB(40,40,40)})
end)
end
end
local tweenService = game:GetService("TweenService")
local tweenInfoButtons = TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
for i, v in pairs(script.Parent:GetChildren()) do
if v:IsA("Frame") then
v.MouseEnter:Connect(function()
tweenService:Create(v, tweenInfoButtons, {BackgroundColor3 = Color3.fromRGB(40, 40, 40)}):Play()
end)
v.MouseLeave:Connect(function()
tweenService:Create(v, tweenInfoButtons, {BackgroundColor3 = Color3.fromRGB(255, 255, 255)}):Play()
end)
end
end
I do have a question about the button script. As soon as I start the second test, an error message appears. How to solve it?
error message -> Players.PlayerName.PlayerGui.Menu.MainFrame.Buttons.ButtonScript:30: attempt to index nil with 'WaitForChild'
same here its really annoying have u found anything that helped?
I’m very grateful for this and it all works except the back button could u suggest anything to help?
Thanks man😊 now I know how to create a menu
Great vid thanks for the help!
Pls i have a problem in line 33 it says that the mousebuttonclick is not a valid member of textbutton
animations dont work, camera script doesn't work, nothing worked (the first time i tried)
skill issue
@@Asadrith ill try it again and see if it works
after i finished scripting the popups, i playtested to find it starting on the credits gui, and after hitting back to the main menu to test out settings and credits, the menu rises up without turning invisible and the credits/settings menu doesnt even appear
I have the exact same problem, except kidna different, when I click on the credits button, the title and buttons goes out of the screen but the popups dont appear
its not working for me, when i go to change the size of the frame it doesnt show anything, and it just closes out and doesnt save
Why do i get this error in this line?
Error: CameraScript is not a valid member of ScreenGui "Players.johnnycat2010.PlayerGui.CameraScript"
Line: script.Parent.Parent.Parent.CameraScript.Enabled = false
so i checked the output and there are no errors but my button script for the setting is no working and i followed the video very closely and it still did not work
Dude me too what can i do
HOW DID YOU MAKE THESE GOOD LOOKING WOW 0:20
ive done everything correctly, but the text buttons dont move and I can't click them again after I clicked them once
now i have got a new problem, when i click a buttonlike sttings or credits, none of the buttons work after, and my start button doesnt work at all for some reason
same and idk how to fix it!
relly nice
but now i have to write this all scripts
Button
👇
Thanks man i am making a game right now cause of i was able to make this
You're the best, thank you
There's a visual glitch when I add a Studio Spawn Point. The MenuCameraPart is facing two walls and some props as a loading screen, which disappear if the Spawn Point is on the map. No Output errors!
camera streaming error, change to persistent
thanks u so much bro !
My camera script won't work, even if i did the changes dude :(
Your game is a life saver
I've checked output and it keeps saying TextButton is not a valid member of Frame
UPDATE:
alr so im pretty sure I just forgot to add the textbutton in but afterwards another part of my gui had issues with a textbutton, uniquely naming all of them seemed to fix the issue
I do still have an issue in my buttonscripts though, it keeps popping up with invalid arguement #1 to pairs
UPDATE #2:
My local popup on buttonscript 22 was misspelt, I've gotten a new error on ButtonScript 33:
attempt to index nil with 'WaitForChild'
UPDATE #3:
I ended up checking the naming scheme of my frames and noticed I named my settings improperly, renaming them fixed the index nil issue.
Afterwards, I ended up getting an infinite yield warning which I managed to fix by reverting every unique name I reserved for my textbuttons.
UPDATE #4:
Hopefully the last error.
I've made it to the play script section but the 80th buttonscript has created another error:
" Expected , got 'end' - Studio - ButtonScript:80"
check your :GetChildren() statement
@@Asadrith I think I've fixed it!! one issue has popped up in my 2nd edit though
No one gonna mention how beautiful the baseplate and lighting is? ANYWAYS, could you please give us a mini tutorial on the lighting settings and properties
old one: ruclips.net/video/kZ-1Twai2Dg/видео.htmlsi=G3aq_lLKQ5jXXl9L
thanks mate god bless!@@Asadrith
i tested it at 20:34 but it didnt work for me the animation of the buttons and the title worked but my settings frame and credits frame wont pop up
-- Buttons script
local tweenInfoPopups = TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
local Popup = {
Settings = "Settings",
Credits = "Credits"
}
for buttonName, frameName in pairs(Popup) do
local button = script.Parent:FindFirstChild(buttonName)
local popupframe = script.Parent.Parent.Popups:FindFirstChild(frameName)
button:WaitForChild("TextButton").MouseButton1Click:Connect(function()
for i, v in pairs(script.Parent:GetDescendants()) do
if v:IsA("TextButton") then
v.Visible = false
end
end
tweenService:Create(script.Parent, tweenInfoPopups, {Position = UDim2.new(0.5,0,1.25,0)}):Play()
tweenService:Create(script.Parent.Parent.Title, tweenInfoPopups, {Position = UDim2.new(0.5,0,-1.25,0)}):Play()
for i, x in pairs(script.Parent.Parent.Popups:GetChildren()) do
if x:IsA("Frame") then
x.Visible = false
x.Position = UDim2.new(0.5,0,1.5,0)
end
end
popupframe.Visible = true
tweenService:Create(popupframe, tweenInfoPopups, {Position = UDim2.new(.5,0,.5,0)}):Play()
end)
end
Camera Spawn code won’t work. Any tips? I spelt everything correctly and no blocks spawn
i need help, whenever i typed in camerainst it wasnt working where we supposed to rename a title of a block to camerainst or something
bro your lighting is amazing, can you give tutorial on how i can do something like that
My credits will pop and go back when i click the button but my setting will only pop up and not go back can someone help me
Good 👍!
6:36 it seems like you changed the pinned comment. where can I find the link for it again?
ive wanted to delete all of the menu gui , folder .... That tou do in the video but now i can't even move when i'm in roblox studio. Like i can move my camera character but i cannot walk and jump
That you*
Ty!
@Insighted When I make the popups invisible and press "Settings", the settings popup doesn't show but if I make it visible, it works, but it shows in the first place, which makes it not pretty. There are no errors in the scrips or anything though. Please help me :D
Actually nvm thx for the tutorial ❤️
Btw everyone you don’t have to follow this video, just go the main pinned comment and you can download it, it has all the scripts made for you, just customize it your welcome
Bro could you help me, my buttons arent kighting up and functioning when i hover over them
Hi I can not find the pinned comment for the button script but you have helped me a lot so fare so well done!!
None of my buttons work (play settings and credits) what do I do
fr same 😭 and I can't delete tge ButtonScript without i5 deleting completly, does someone know how to fix it and let me click on setting or credits
Everything is working but camera not. When I play the game I will only see the gui (working) but not camera position if you know what I mean. Is there a fix?
Well that just means u messed up the script of the camera, try to check it again.
Thank you :)
question, how do you make the button animations be for a specific button? my play button is a different color than my credits button and i want them to have different color animations
2 weeks later i figured it out, all i needed to do was create a separate scripts for each button
edit: i pasted the wrong script, fixing it rn
If I wanted to remove settings what do I need to delete from the scripts or change ?
I spent 10h on this but finally i got this 😭
I dont know if i made a wrong but the animation script doesnt work
i tried the advice for if it didn't load in but it didn't work
The back button on the credits tab isn’t working I’ve checked the output nothing wrong with script any ideas?
Everything else is working fine
i have the same issue rn bro