function tween(obj, dur, cmd) game:GetService('TweenService'):Create(obj, dur, cmd):Play() end workspace.Camera.CameraType = Enum.CameraType.Scriptable tween(workspace.Camera, TweenInfo.new(1), {CFrame = workspace.MenuCam.CFrame}) first local script script.Parent.Mousebutton1Click:connect(function() local gui = script.Parent.Parent gui.Enabled = false game.Workspace = Enum.CameraType.Custom end) second local scrip
A comment to everyone, who names their campart "Camera" : if you name your campart "Camera", it will break the code, name it something else than "Camera". Thanks for the video, helped me a lot!
really polished and good looking system, but i advise getting closer to your microphone in future videos, or adjusting it so it picks up your voice rather than the keyboard :)
Help! sometimes i get a error that says: "MenuCamera is not a valid member of Workspace" and when i check in the explorer the MenuCamera part is gone. I don't know what to do. Please someone help me! Edit: I figured it out and the solution is: Click workspace, in the properties search "Streamig enabled" click the box and disable it. Hope this helps.
I was trying to do this with ImageLabel and a transition to a loading screen, i gave up. Also roblox studio for some reason didnt show my game and im depressed cuz i spent hours making that map and its all gone
hey man, love the vid and it was very helpful, but i got an issue if u dont mind helping. so it goes to the cutscene and everything perfectly, but when i click the play button it dosent bring me back and just removbes the play button Edit: I found the solution. replace this script: script.Parent.Mousebutton1Click:connect(function() local gui = script.Parent.Parent gui.Enabled = false game.Workspace = Enum.CameraType.Custom end) With this one: script.Parent.MouseButton1Click:Connect(function() local gui = script.Parent.Parent gui.Enabled = false -- Disable the GUI -- Reset camera to the player's character local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoidRootPart = character:WaitForChild("HumanoidRootPart") -- Move the character to a spawn point (ensure you have a SpawnLocation in Workspace) local spawnLocation = game.Workspace:FindFirstChild("SpawnLocation") if spawnLocation then humanoidRootPart.CFrame = spawnLocation.CFrame + Vector3.new(0, 3, 0) -- Offset to prevent clipping else warn("SpawnLocation not found in Workspace!") end -- Reset the camera type local camera = game.Workspace.CurrentCamera camera.CameraType = Enum.CameraType.Custom end) If yall have any issues let me know
How do i hide my other ScreenGui if on play screen? I added 2 screen Gui one is just called like that other one is the menu Gui i would like to hide ScreenGui when on MenuGui
in the menugui script, add: game.Players.LocalPlayer.PlayerGui.ScreenGui.Enabled = false in the playbutton script, add: game.Players.LocalPlayer.PlayerGui.ScreenGui.Enabled = true
@@koaltreusI also got a question is it possible to make a BilboardGui Become visible if you pressed a GuiButton and invisible if you pressed the button again?
Hey, commenting again, but i tried combining this with surface GUI for something, and it worked really good, but a problem is that every time the character resets or dies, the menu repeats the tweening and goes to the menu screen again, is there a way to solve that, or is it easier to just turn off the reset option in the roblox menu? (because the character wont take damage in my game anyways) - I'm going to put my code for that below if needed Another REALLY important bug this time tho, is that like 60% of the time the screen cuts to the regular avatar camera right after the tweening finishes, i've set the workspace camera to scriptable and so on already, but i'll see if it could be because of another script im using for player camera effects, i dont think its because of another script tho, because the cameratype remains scriptable even when it kicks me off the loading screen. Code: > Local-script in MenuGUI function tween(obj, dur, cmd) game:GetService('TweenService'):Create(obj, dur, cmd):Play() end local MenuCam = workspace:WaitForChild("MenuCam") workspace.Camera.CameraType = Enum.CameraType.Scriptable tween(workspace.Camera, TweenInfo.new(1), {CFrame = MenuCam.CFrame}) > Local-script under Play(button) script.Parent.MouseButton1Click:Connect(function() local gui = script.Parent.Parent game.Workspace.Camera.CameraType = Enum.CameraType.Custom end) Any help from anyone appreciated, even tho i kind of broke it, its still a really good and quick yet versatile tutorial that i learnt a lot from. Also, the scripts are modified according to what i needed in my game, i used workspace:WaitForChild("MenuCam") instead of what's in the video, because the MenuCam would load later causing the whole script to stop when it couldn't find the MenuCam part, and so on.
@@koaltreus is there a way to make a video to explain it or explain it in another way I'm wondering I know this might be a waste of your time I'm sorry about that
@@eersatzz in the menugui script, where you see “tween(workspace.Camera, TweenInfo.new(1), {CFrame = workspace.MenuCam.CFrame})” replace the 1 with a 0
camera shows a completely different place than what its supposed to, and it still shows the camera's perspective even after i press play *found a solution to the second one, first one still remains unsolved* for the second one, the error says: Unable to assign property Workspace. Workspace expected, got EnumItem script: script.Parent.MouseButton1Click:connect(function() local gui = script.Parent.Parent gui.Enabled = false game.Workspace = Enum.CameraType.Custom end) ended up asking chat gpt, line 4 was supposed to be local camera = game.Workspace.CurrentCamera camera.CameraType = Enum.CameraType.Custom end)
@@TwoPlayerFilms dont remember but this is the script i use: local TweenService = game:GetService('TweenService') function tween(obj, tweenInfo, cmd) TweenService:Create(obj, tweenInfo, cmd):Play() end local camera = workspace.CurrentCamera camera.CameraType = Enum.CameraType.Scriptable -- Enable manual control
local Cam = workspace:WaitForChild("Cam") local tweenInfo = TweenInfo.new(0.01) tween(camera, tweenInfo, {CFrame = Cam.CFrame})
Anybody able to help me with the second script? I have copied the script but it says "Unable to assign property workspace. Workspace expected, got EnumItem"
dude, when i typed the script, menucam isnot working, camera is going somewhere else, not here i want, this is so fake man, can u post new fixed video of this ?
if you copied it from the pinned comment, make sure the "Mousebutton" in the first line is "MouseButton". If that doesn't work, then idk because I'm not good at coding
function tween(obj, dur, cmd) game:GetService('TweenService'):Create(obj, dur, cmd):Play() end workspace.Camera.CameraType = Enum.CameraType.Scriptable tween(workspace.Camera, TweenInfo.new(1), {CFrame = workspace.MenuCam.CFrame}) LocalScript:6: MenuCam is not a valid member of Workspace "Workspace". That error happens even though i have put in MenuCam in workspace, i'm kinda new to scripting, do i have to use 'MenuCam.Parent = game.Workspace'?
@@learningscripting maybe check if your MenuCam part is anchored, if not, it could’ve fallen into the void. But in the script, try replacing every “workspace.MenuCam” with “workspace:WaitForChild(‘MenuCam’)”
I recommended using "Variables" so it still works without causing any problems Here is mine: local lobbyF = workspace:WaitForChild("Lobby") -- if your menucam is in a folder or model in workspace local menuF = lobbyF:WaitForChild("Menu") -- if your menucam is inside the lobbyF and another folder or model local menuCam = menuF:WaitForChild("MenuCam") -- your actual menucam function tween(obj, dur, cmd) game:GetService('TweenService'):Create(obj, dur, cmd):Play() end workspace.Camera.CameraType = Enum.CameraType.Scriptable tween(workspace.Camera, TweenInfo.new(1), {CFrame = menuCam.CFrame}) -- add the menucam here
function tween(obj, dur, cmd)
game:GetService('TweenService'):Create(obj, dur, cmd):Play()
end
workspace.Camera.CameraType = Enum.CameraType.Scriptable
tween(workspace.Camera, TweenInfo.new(1), {CFrame = workspace.MenuCam.CFrame})
first local script
script.Parent.Mousebutton1Click:connect(function()
local gui = script.Parent.Parent
gui.Enabled = false
game.Workspace = Enum.CameraType.Custom
end)
second local scrip
w
it's "MouseButton1Click" or else it'll error
thx
A comment to everyone, who names their campart "Camera" : if you name your campart "Camera", it will break the code, name it something else than "Camera". Thanks for the video, helped me a lot!
really polished and good looking system, but i advise getting closer to your microphone in future videos, or adjusting it so it picks up your voice rather than the keyboard :)
Alrighty! Thanks!
Hey man great video! keep up the good work :)
Help! sometimes i get a error that says: "MenuCamera is not a valid member of Workspace" and when i check in the explorer the MenuCamera part is gone. I don't know what to do. Please someone help me!
Edit: I figured it out and the solution is:
Click workspace, in the properties search "Streamig enabled" click the box and disable it. Hope this helps.
Thank you!! :D
TYSM!!!!!!!!!
bro i genuinelyy love u for ths
help my camera doesnt go to my scene it just locks nowhere near where i put the camera pls help
same
same
the checkpoint must be near
go click on workspace and get properties open and turn off streaming enabled
1k views!! Thanks y’all! ❤
Edit: 2K VIEWS NOW?????????
nah u deserve 100k views
now 22 k congrats
this doesnt work for me i always spawn as my charakter i even changed the command like you said in the comment section pls help me
u explain realy good.
thx for advices!
I was trying to do this with ImageLabel and a transition to a loading screen, i gave up.
Also roblox studio for some reason didnt show my game and im depressed cuz i spent hours making that map and its all gone
Hey is it also possible to make a 360 cam in the sky, just like a main menu but so you can rotate it? And could you make a tutorial about it?
hey man, love the vid and it was very helpful, but i got an issue if u dont mind helping. so it goes to the cutscene and everything perfectly, but when i click the play button it dosent bring me back and just removbes the play button
Edit: I found the solution. replace this script: script.Parent.Mousebutton1Click:connect(function()
local gui = script.Parent.Parent
gui.Enabled = false
game.Workspace = Enum.CameraType.Custom
end)
With this one: script.Parent.MouseButton1Click:Connect(function()
local gui = script.Parent.Parent
gui.Enabled = false -- Disable the GUI
-- Reset camera to the player's character
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
-- Move the character to a spawn point (ensure you have a SpawnLocation in Workspace)
local spawnLocation = game.Workspace:FindFirstChild("SpawnLocation")
if spawnLocation then
humanoidRootPart.CFrame = spawnLocation.CFrame + Vector3.new(0, 3, 0) -- Offset to prevent clipping
else
warn("SpawnLocation not found in Workspace!")
end
-- Reset the camera type
local camera = game.Workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Custom
end)
If yall have any issues let me know
Great tutorial, but what do I need to do if I want to add a blur effect to it?
it doesnt work for me :(
the player when dead, the Text Button still appeared and the cam go back to MenuCam
@@okelahbegitu4494 disable “ResetGuiOnSpawn” in the menugui
THANK YOU!!!! Im subbing now😊
the camera script didn't worked for me, idk if it's because my game is R6 or something
it also works in r6, try to copy it again ;)
can you make a custom animation tutorial? ive tried once, but its never worked (i used the inbuilt animation editors on rigs)
How do i hide my other ScreenGui if on play screen? I added 2 screen Gui one is just called like that other one is the menu Gui i would like to hide ScreenGui when on MenuGui
in the menugui script, add:
game.Players.LocalPlayer.PlayerGui.ScreenGui.Enabled = false
in the playbutton script, add:
game.Players.LocalPlayer.PlayerGui.ScreenGui.Enabled = true
@@koaltreus Thank you! It works perfectly
@@koaltreusI also got a question is it possible to make a BilboardGui Become visible if you pressed a GuiButton and invisible if you pressed the button again?
@@NoopDev_Too yea, thats possible
@@koaltreus is it then a simular script to the one what hides the screenGui but just modified by adding instead of frame name billboard name?
thanks for the tutorial but i cant place anything if i want the menu to work(im trying to make a game)
can u help, when i did the script and went to test it, it was where i spawned can you help me figure out why
Idk why but it's tweening the camera to the part but then immediately going to the player without me pressing the button
set the cameratype to scriptable, then i think itll work
@@koaltreus I had the same problem and tried it, it didn't work, any other ideas to make this work?
@@koaltreus That doesnt work
@@koaltreus I have the same problem. Is there any way to fix it?
@@koaltreus still doesn't work, could you help ?
How do i make it so that, when i move my mouse, the camera also moves
Hi, how i can add music to the main menu, its kinda boring like that, whit no music
Hey, commenting again, but i tried combining this with surface GUI for something, and it worked really good, but a problem is that every time the character resets or dies, the menu repeats the tweening and goes to the menu screen again, is there a way to solve that, or is it easier to just turn off the reset option in the roblox menu? (because the character wont take damage in my game anyways) - I'm going to put my code for that below if needed
Another REALLY important bug this time tho, is that like 60% of the time the screen cuts to the regular avatar camera right after the tweening finishes, i've set the workspace camera to scriptable and so on already, but i'll see if it could be because of another script im using for player camera effects, i dont think its because of another script tho, because the cameratype remains scriptable even when it kicks me off the loading screen.
Code:
> Local-script in MenuGUI
function tween(obj, dur, cmd)
game:GetService('TweenService'):Create(obj, dur, cmd):Play()
end
local MenuCam = workspace:WaitForChild("MenuCam")
workspace.Camera.CameraType = Enum.CameraType.Scriptable
tween(workspace.Camera, TweenInfo.new(1), {CFrame = MenuCam.CFrame})
> Local-script under Play(button)
script.Parent.MouseButton1Click:Connect(function()
local gui = script.Parent.Parent
game.Workspace.Camera.CameraType = Enum.CameraType.Custom
end)
Any help from anyone appreciated, even tho i kind of broke it, its still a really good and quick yet versatile tutorial that i learnt a lot from.
Also, the scripts are modified according to what i needed in my game, i used workspace:WaitForChild("MenuCam") instead of what's in the video, because the MenuCam would load later causing the whole script to stop when it couldn't find the MenuCam part, and so on.
You could disable the reset button or disable ‘ResetGuiOnSpawn’ in the menu gui
@@koaltreus thanks, i didnt know that existed
THANKSSSSS
it kinda works but the camera just points down in the grass and i have anchored it and made sure it was in the front plss help
Can you add a *"Copy and Paste"* to the code? Thanks!
Also, it made it so it went to the player without me pressing the button and had me stuck there. Thanks!
UPDATE = NVM IT WORKED!!!! I CANT FIND THE WORDS TO THANK YOU. CAN I ADDD YOU ON DISCORD??
Hi! everything works just fine, but the problem is after i press play, it just makes the camera stuck at spawn, any ideas on this?
it who'd be great is you put the script in the discerption
Yo thanks Koaltreus!!!
NVM, I fixed it, amazing tutorial
question is there a way to add animated npcs to your main menu or cutscene? I would like to know
Yes, there is
@@koaltreus is there a way to make a video to explain it or explain it in another way I'm wondering I know this might be a waste of your time I'm sorry about that
@@FilmTune it’s all good, I might make a vid on it soon
@@koaltreus well cya soon I guess thanks for your help👍
oh also whats your roblox profile I wanna give you a request and follow you for your help
@@FilmTunemy profile is Koaltreus
I need your help. The code works successfully but it does not disappear when I press the ''Play'' button. What should I do?
Hey what should i do when its not putting my camera when i click the start button?
mb putting my camera back to the pov of my avatar
hey bro do yk why however much i rotate the cube (camera) whenever i press play it always flops to the side or goes upside down? thanks
is it anchored in the properties?
is there a way to have the game load on the camera instantly instead of seeing the transition TO the camera spot?
@@eersatzz in the menugui script, where you see “tween(workspace.Camera, TweenInfo.new(1), {CFrame = workspace.MenuCam.CFrame})” replace the 1 with a 0
camera shows a completely different place than what its supposed to, and it still shows the camera's perspective even after i press play
*found a solution to the second one, first one still remains unsolved*
for the second one, the error says: Unable to assign property Workspace. Workspace expected, got EnumItem
script:
script.Parent.MouseButton1Click:connect(function()
local gui = script.Parent.Parent
gui.Enabled = false
game.Workspace = Enum.CameraType.Custom
end)
ended up asking chat gpt,
line 4 was supposed to be
local camera = game.Workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Custom
end)
which code's line 4?
@@TwoPlayerFilms dont remember but this is the script i use:
local TweenService = game:GetService('TweenService')
function tween(obj, tweenInfo, cmd)
TweenService:Create(obj, tweenInfo, cmd):Play()
end
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable -- Enable manual control
local Cam = workspace:WaitForChild("Cam")
local tweenInfo = TweenInfo.new(0.01)
tween(camera, tweenInfo, {CFrame = Cam.CFrame})
@@iquityoutube thank you for your help!!! But, I found something else within the time waiting!!
make a tutorial on main menu music pls
Anybody able to help me with the second script? I have copied the script but it says "Unable to assign property workspace. Workspace expected, got EnumItem"
dude, when i typed the script, menucam isnot working, camera is going somewhere else, not here i want, this is so fake man, can u post new fixed video of this ?
I don’t see anything when I play the camera except the void why?
happened to me too. in the menugui script, try replacing every “workspace.MenuCam” with “workspace:WaitForChild(‘MenuCam’)”
@@koaltreus ok
Hello, i have a problem, my camera shows a completely different place than whats its supposed to. help pls
send code ill fix
yo bro everytime i reset the main menu gonna appear again how do i fix it?
@@duckbusiness9524 disable “ResetGuiOnSpawn” in the menugui’s properties
@@koaltreus tysm its worked
Thank you!
@@thatshiairaqi9886 np!
The first script wont work i put the script in and it has the play button but its not at the scenery its where my spawn point is pls help
@@usedtobel1ll1gam3s in the first script, replace every ‘workspace.MenuCam’ with ‘workspace:WaitForChild(“MenuCam”)’
@@koaltreus I had the same problem, and I tried that but it doesn't work
when i cklick start then the start gui go but im still in the menu screen
you never said anything about A. the camera having range
B. Camera has a limited amount of uses
explain
THANK YOU!!!!!
yo somethings wrong it just locks in place and it saids that its not a valid member of workspace
figured it out but play wont dissapear
but when you reset it does it again.
the start button doesnt work
super simple thank youuu
In the second script line isn't working its something witht the
Gui.enabled
Please help
script.Parent.MouseButton1Click:Connect(function()
local gui = script.Parent.Parent
gui.Enabled = false
game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
end)
@@runer2343qqwe My code didn't work before switching the second script with yours. Thanks so much!
Why is mine going under the map ;-;
the script to stop the animation doesnt work
Mousebutton1Click is not a valid member of TextButton "Players.zaza19745.PlayerGui.Main Menu.Frame.Level 1 Title
How do you get the sitting guy
create a guy using the rig builder (found in 'Avatar' section) and just rotate and move its bodyparts to make a sitting pose
@@koaltreus the script didn’t work for the camera
@@koaltreus i tried it the button didn’t disappear when i press play and I didn’t pop up the the camera when i spawned
The script doesn't work.
how u get the cmaera
Make a part and name it MenuCam
the butto script dosent work for me
if you copied it from the pinned comment, make sure the "Mousebutton" in the first line is "MouseButton". If that doesn't work, then idk because I'm not good at coding
i have it was i cool tutorial
THIS SHIT DOESNT WORK IN MY GAYM IT SAYS:i cant find MENUCAM in workspaceeeeeeeeeeeeeeeeeeeee
did you name the camera menucam?
@@Icee-Da-Axolotl MenuCam
same problem did you find solution ?
@@Kohkakave workspace:WaitForChild(MenuCam")
turn streaming enabled off in workspace and itll work
Ok
I have a glitch where somtimes it worked and sometimes doesn’t
make sure you anchored the camera part
I did
function tween(obj, dur, cmd)
game:GetService('TweenService'):Create(obj, dur, cmd):Play()
end
workspace.Camera.CameraType = Enum.CameraType.Scriptable
tween(workspace.Camera, TweenInfo.new(1), {CFrame = workspace.MenuCam.CFrame})
LocalScript:6: MenuCam is not a valid member of Workspace "Workspace".
That error happens even though i have put in MenuCam in workspace, i'm kinda new to scripting, do i have to use 'MenuCam.Parent = game.Workspace'?
@@learningscripting maybe check if your MenuCam part is anchored, if not, it could’ve fallen into the void. But in the script, try replacing every “workspace.MenuCam” with “workspace:WaitForChild(‘MenuCam’)”
omg ur a life saviour, TYSM
I recommended using "Variables" so it still works without causing any problems
Here is mine:
local lobbyF = workspace:WaitForChild("Lobby") -- if your menucam is in a folder or model in workspace
local menuF = lobbyF:WaitForChild("Menu") -- if your menucam is inside the lobbyF and another folder or model
local menuCam = menuF:WaitForChild("MenuCam") -- your actual menucam
function tween(obj, dur, cmd)
game:GetService('TweenService'):Create(obj, dur, cmd):Play()
end
workspace.Camera.CameraType = Enum.CameraType.Scriptable
tween(workspace.Camera, TweenInfo.new(1), {CFrame = menuCam.CFrame}) -- add the menucam here
what is lobby supposed to be here
@@iquityoutube if your menucam is in a folder named "Lobby" i only done it for organized workspace objects...
Thank you!