#3D Main Menu
68 messages · Page 1 of 1 (latest)
and here's the script
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local StarterGui = game:GetService("StarterGui")
local LocalPlayer = Players.LocalPlayer
local PlayerGui = LocalPlayer.PlayerGui
local MenuGuis = StarterGui.Menu
local Credits = MenuGuis.Credits:Clone()
local MainMenu = MenuGuis.MainMenu:Clone()
Credits.Parent = PlayerGui
MainMenu.Parent = PlayerGui
local Camera = workspace.CurrentCamera
Camera.CameraType = Enum.CameraType.Scriptable
local GoTo = Instance.new("StringValue")
GoTo.Value = "MainMenu"
GoTo.Name = "GoTo"
GoTo.Parent = Camera
local Menu = workspace.GUI
local CameraParts = Menu:WaitForChild("CameraParts")
local Remotes = ReplicatedStorage.Remotes
Camera.CFrame = CameraParts[GoTo.Value].CFrame
RunService.RenderStepped:Connect(function()
local GoToPosition = CameraParts[GoTo.Value].CFrame
GoToPosition += Vector3.new(math.cos(tick() * 5) * .1, math.cos(tick() * 5) * .1, math.cos(tick() * 5) * .1)
Camera.CFrame = Camera.CFrame:Lerp(GoToPosition, .1)
end)
local playBtn = MainMenu.PlayButton
local creditsBtn = MainMenu.CreditsButton
local backBtn = Credits.BackButton.Button
local function regButton(Button: TextButton)
Button.MouseButton1Click:Connect(function()
GoTo.Value = Button.Name
end)
end
regButton(creditsBtn)
regButton(backBtn)```
I just have no idea
everything looks good
guess what
you would not believe this
MainMenu is not a valid memer of Folder Workspace.GUI.CameraParts
lol jk
just do :WaitForChild()
the part may not have been loaded in yet
also thats a damn complicated way of making a camera tween 💀
where I should change it?
where its trying to index the child
you just do :WaitForChild("MainMenu")
aka the line that errors
instead of doing .MainMenu
I watched a tutorial on yt how to make a 3d main menu
oh that makes sense, you dont know where to put waitforchild
you should rlly try to learn basic coding before attemting to copy some code from yt for things
I know basic coding and I wrote the code by myself
not copied
bro...
I donno why you people are judging everyone without even knowing anything about what they did etc
you didnt know where to put waitforchild
well, cuz it's my first time doing a 3d main menu?
i mean im not judging but waitforchild is a basic thing
WaitForChild is used SOOOOOO often
its a basic thing you just gotta know
and a 3d main menu is just hard, cause you gotta use CurrentCamera, need to understand Vector3 for that, make the player not move and stuff
waitforchild is a common method
it seems like you dont understand parts loading
i doubt you understand lerp and cframes
even if it isnt copy paste its someone else's code, you just copied it very slowly
😭
yea typing it out doesn't make u understand it better
legit just watch a 40 min yt video on basic scripting it'll help a lot for modifying scripts even if u wont be able to write ur own yet
yt tutorials mostly such tho
id say its better to go devforum / official tuts
yea some r good for basics then go to dev forum yea
not for the basics
yes for the basics
the official roblox tutorials are good
those in the same website as the api
https://www.youtube.com/watch?v=BkYwRdCukZA&list=PLhieaQmOk7nIfMZ1UmvKGPrwuwQVwAvFa
I can recommend this
Beginner's Roblox Scripting Tutorial #1 - Roblox Studio Basics (Beginner to Pro 2019)
Link to Beginner's Tutorial Series:
https://www.youtube.com/playlist?list=PLhieaQmOk7nIfMZ1UmvKGPrwuwQVwAvFa
Link to download Roblox Studio:
https://www.roblox.com/create
Social Media:
https://twitter.com/realtapwater
https://instagram.com/realtapwater
New...
idk didnt look into them yet
if you want the roblox tutorials
they just updated them
and theyre really good
looks like it
its advanced blender stuff
im even too stupid to understand the basics 😭
nah i actually do not understand these yt tutorials it takes sooo long to understand everything
so many keybinds to remember
fr yt tutorials are kinda bad at
like
explaining stuff
its just watch someone do it while kinda explaining it