--//Services local RunService = game:GetService("RunService") local Players = game:GetService("Players") --//Objets local CameraPart = workspace:WaitForChild("CameraPart") local CurrentCamera = workspace.CurrentCamera local LocalPlayer = Players.LocalPlayer local Mouse = LocalPlayer:GetMouse() --//Gui local GUI = script.Parent local PlayButton = GUI.PlayButton --//Constants local MOVE_SPEED = 150 --//Functions local function UpdateCamera() local Center = CameraPart.CFrame local MoveVector = Vector3.new((Mouse.X - Center.X)/MOVE_SPEED, (Mouse.Y - Center.Y)/MOVE_SPEED, 0) CurrentCamera.CFrame = CameraPart.CFrame * CFrame.Angles(math.rad(-(Mouse.Y - Center.Y)/MOVE_SPEED), math.rad(-(Mouse.X - Center.Y)/MOVE_SPEED), 0) end --//Events local Connection = RunService.RenderStepped:Connect(UpdateCamera) PlayButton.Activated:Connect(function() Connection:Disconnect()
Local RunService = game:GetService("RunService") local players = game:GetService("Players") local CameraPart = workspace:WaitForChild("CameraPart") local CurrentCamera = workspace.CurrentCamera local LocalPlayer = players.LocalPlayer local Mouse = LocalPlayer:GetMouse() local GUI = script.Parent local PlayButton = GUI.PlayButton local MOVE_SPEED = 150 local function UpdateCamera() local Center = CameraPart.CFrame local MoveVector = Vector3.new((Mouse.X - Center.X)/MOVE_SPEED, (Mouse.Y - Center.Y)/MOVE_SPEED, 0) CurrentCamera.CFrame = CameraPart.CFrame * CFrame.Angles(math.rad(-(Mouse.Y - Center.Y)/MOVE_SPEED), math.rad(-(Mouse.X - Center.Y)/MOVE_SPEED), 0) end local Connection = RunService.RenderStepped:Connect(UpdateCamera) PlayButton.Activated:Connect(function() Connection:Disconnect()
hii! im planning on doing a horor game, and i dont really know lua code language, only thing i know to do are proximity prompt dialogues and theres so much to do on a horror ame, would you like to help me? do i need to pay for it?
does it only work on certain templates as I am using the FPS system one and I've followed a bunch of tutorials for main menus and nothing at all has worked. I've literally been doing this for hours now :(
Istg bro I’m tryna make a story game and I want the main menu to be faced at the terrain I created but each script won’t let me bro keep me posted if you find a script that works
--//Services local RunService = game:GetService("RunService") local Players = game:GetService("Players") --//Objets local CameraPart = workspace:WaitForChild("CameraPart") local CurrentCamera = workspace.CurrentCamera local LocalPlayer = Players.LocalPlayer local Mouse = LocalPlayer:GetMouse() --//Gui local GUI = script.Parent local PlayButton = GUI.PlayButton --//Constants local MOVE_SPEED = 150 --//Functions local function UpdateCamera() local Center = CameraPart.CFrame local MoveVector = Vector3.new((Mouse.X - Center.X)/MOVE_SPEED, (Mouse.Y - Center.Y)/MOVE_SPEED, 0) CurrentCamera.CFrame = CameraPart.CFrame * CFrame.Angles(math.rad(-(Mouse.Y - Center.Y)/MOVE_SPEED), math.rad(-(Mouse.X - Center.Y)/MOVE_SPEED), 0) end --//Events local Connection = RunService.RenderStepped:Connect(UpdateCamera) PlayButton.Activated:Connect(function() Connection:Disconnect()
brooo, :c it doesnt work. I literally copied the script from the comments, did every step u did. I dont have the camera plus the play button aint working. I spent 1 hour to decorate my main menu place and nothing works ;c Edit : Nvm It worked!!! looks awesome tysm bro!
Your camera moves too much to right Fixed Code local RunService = game:GetService("RunService") local Players = game:GetService("Players") local CameraPart = game.Workspace:WaitForChild("CameraModel"):WaitForChild("CameraPart") local CurrentCamera = game.Workspace.CurrentCamera local LocalPlayer = Players.LocalPlayer local Mouse = LocalPlayer:GetMouse() local GUI = script.Parent local MOVE_SPEED = 25 local function UpdateCamera() local Center = CameraPart.CFrame local MoveVector = Vector3.new((Mouse.X - Center.X)/MOVE_SPEED, (Mouse.Y - Center.Y)/MOVE_SPEED, 0) CurrentCamera.CFrame = CameraPart.CFrame * CFrame.Angles(math.rad(-(Mouse.Y - Center.Y)/MOVE_SPEED), math.rad(-(Mouse.X - Center.X/2)/MOVE_SPEED), 0) end local Connection = RunService.RenderStepped:Connect(UpdateCamera)
FULL SCRIPT local RunService = game:GetService("RunService") local players = game:GetService("Players") local CameraPart = workspace:WaitForChild("CameraPart") local CurrentCamera = workspace.CurrentCamera local LocalPlayer = players.LocalPlayer local Mouse = LocalPlayer:GetMouse() local GUI = script.Parent local PlayButton = GUI.PlayButton local MOVE_SPEED = 150 local function UpdateCamera() local Center = CameraPart.CFrame local MoveVector = Vector3.new((Mouse.X - Center.X)/MOVE_SPEED, (Mouse.Y - Center.Y)/MOVE_SPEED, 0) CurrentCamera.CFrame = CameraPart.CFrame * CFrame.Angles(math.rad(-(Mouse.Y - Center.Y)/MOVE_SPEED), math.rad(-(Mouse.X - Center.Y)/MOVE_SPEED), 0) end local Connection = RunService.RenderStepped:Connect(UpdateCamera) PlayButton.Activated:Connect(function() Connection:Disconnect()
Thank you a ton be trying to make something for my game like this forever
When I was a lad I ate 4 dozen eggs every morning to help me get large, and now that I’m grown I eat 5 dozen eggs so I’m roughly the size of a barge
WOW i subbed and liked! This really helped me!
Tysm! 🥰
@@deciq_z can u help me with this it wont work for me idk why🤨🤨🤔
i’m putting the CamreaPart that I put in and it doesn’t show anything in the script I put the same name in the script, but it doesn’t show anything
I keep getting the " Infinite yield possible on 'Workspace:WaitForChild("CameraPart")' " error
You have to name the part to CameraPart
great video thanks
Why'd you create a vector and not use it?
i wonder whos that red hat guy anyway?????
is not working😭😭😭😭😭😭 how do u fix that?
Not working
Thank you alot
what musikc
i did all scripts and not working
why wouldn't you just copy all script?
and put in the description?
how do i put sound
It's not workinggg helppp I've been working for hourssss😭😭😭
--//Services
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
--//Objets
local CameraPart = workspace:WaitForChild("CameraPart")
local CurrentCamera = workspace.CurrentCamera
local LocalPlayer = Players.LocalPlayer
local Mouse = LocalPlayer:GetMouse()
--//Gui
local GUI = script.Parent
local PlayButton = GUI.PlayButton
--//Constants
local MOVE_SPEED = 150
--//Functions
local function UpdateCamera()
local Center = CameraPart.CFrame
local MoveVector = Vector3.new((Mouse.X - Center.X)/MOVE_SPEED, (Mouse.Y - Center.Y)/MOVE_SPEED, 0)
CurrentCamera.CFrame = CameraPart.CFrame * CFrame.Angles(math.rad(-(Mouse.Y - Center.Y)/MOVE_SPEED), math.rad(-(Mouse.X - Center.Y)/MOVE_SPEED), 0)
end
--//Events
local Connection = RunService.RenderStepped:Connect(UpdateCamera)
PlayButton.Activated:Connect(function()
Connection:Disconnect()
GUI:Destroy()
end)
Here The Script
it wont work i copied every step I named everything the same as you named it, How to fix pls?
Dev_Deciqz I need help. when I press the start button the camera is bugged
Please Lmk how to fix!!
Bro why did i spawn on R15? still, thanks, your script worked, im making a game on R6 not R15
Game settings > Avatar
Local RunService = game:GetService("RunService")
local players = game:GetService("Players")
local CameraPart = workspace:WaitForChild("CameraPart")
local CurrentCamera = workspace.CurrentCamera
local LocalPlayer = players.LocalPlayer
local Mouse = LocalPlayer:GetMouse()
local GUI = script.Parent
local PlayButton = GUI.PlayButton
local MOVE_SPEED = 150
local function UpdateCamera()
local Center = CameraPart.CFrame
local MoveVector = Vector3.new((Mouse.X - Center.X)/MOVE_SPEED, (Mouse.Y - Center.Y)/MOVE_SPEED, 0)
CurrentCamera.CFrame = CameraPart.CFrame * CFrame.Angles(math.rad(-(Mouse.Y - Center.Y)/MOVE_SPEED), math.rad(-(Mouse.X - Center.Y)/MOVE_SPEED), 0)
end
local Connection = RunService.RenderStepped:Connect(UpdateCamera)
PlayButton.Activated:Connect(function()
Connection:Disconnect()
GUI:Destroy()
end)
LEGEND TYSM OMG U SAVED ME
hii! im planning on doing a horor game, and i dont really know lua code language, only thing i know to do are proximity prompt dialogues and theres so much to do on a horror ame, would you like to help me? do i need to pay for it?
How did ur roblox horror game go?
idk what i did wrong, followed every step but when i clicked play it didnt work (i spent an _hour_ doing the script)
Im so sorry about it. What is the error you are getting?
@@deciq_z idek im not rlly getting an error it just didnt work
@@deciq_z wait nvm i think i fount jt lmao
im getting the sam how did u fix@@ella_yep
@@ella_yep same, with every tutorial i do, none of the scripts work for me
does it only work on certain templates as I am using the FPS system one and I've followed a bunch of tutorials for main menus and nothing at all has worked. I've literally been doing this for hours now :(
Istg bro I’m tryna make a story game and I want the main menu to be faced at the terrain I created but each script won’t let me bro keep me posted if you find a script that works
@averyrandomdude7468 I literally gave up on the game bro :/
@ same dawg
Do ur script so that when ur in the gui u cant move , ur invicible and invisible
😄Thank You
why does my charatcer spawn in first
--//Services
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
--//Objets
local CameraPart = workspace:WaitForChild("CameraPart")
local CurrentCamera = workspace.CurrentCamera
local LocalPlayer = Players.LocalPlayer
local Mouse = LocalPlayer:GetMouse()
--//Gui
local GUI = script.Parent
local PlayButton = GUI.PlayButton
--//Constants
local MOVE_SPEED = 150
--//Functions
local function UpdateCamera()
local Center = CameraPart.CFrame
local MoveVector = Vector3.new((Mouse.X - Center.X)/MOVE_SPEED, (Mouse.Y - Center.Y)/MOVE_SPEED, 0)
CurrentCamera.CFrame = CameraPart.CFrame * CFrame.Angles(math.rad(-(Mouse.Y - Center.Y)/MOVE_SPEED), math.rad(-(Mouse.X - Center.Y)/MOVE_SPEED), 0)
end
--//Events
local Connection = RunService.RenderStepped:Connect(UpdateCamera)
PlayButton.Activated:Connect(function()
Connection:Disconnect()
GUI:Destroy()
end)
"Here The Script"
brooo, :c it doesnt work. I literally copied the script from the comments, did every step u did. I dont have the camera plus the play button aint working. I spent 1 hour to decorate my main menu place and nothing works ;c
Edit : Nvm It worked!!! looks awesome tysm bro!
How do u fixed it?
hey how did you get it to work please?
how did you fix it?!?!?!?!?
yo bro how did you fix it?
bro this sucks i followed all instructions and it didnt work
2:09 i do not know how.. 💀
Your camera moves too much to right
Fixed Code
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local CameraPart = game.Workspace:WaitForChild("CameraModel"):WaitForChild("CameraPart")
local CurrentCamera = game.Workspace.CurrentCamera
local LocalPlayer = Players.LocalPlayer
local Mouse = LocalPlayer:GetMouse()
local GUI = script.Parent
local MOVE_SPEED = 25
local function UpdateCamera()
local Center = CameraPart.CFrame
local MoveVector = Vector3.new((Mouse.X - Center.X)/MOVE_SPEED, (Mouse.Y - Center.Y)/MOVE_SPEED, 0)
CurrentCamera.CFrame = CameraPart.CFrame * CFrame.Angles(math.rad(-(Mouse.Y - Center.Y)/MOVE_SPEED), math.rad(-(Mouse.X - Center.X/2)/MOVE_SPEED), 0)
end
local Connection = RunService.RenderStepped:Connect(UpdateCamera)
doesnt work for me do i put the Camera under StarterGUI?
Nevermind thank you so much!
actually it doesnt work.
FULL SCRIPT
local RunService = game:GetService("RunService")
local players = game:GetService("Players")
local CameraPart = workspace:WaitForChild("CameraPart")
local CurrentCamera = workspace.CurrentCamera
local LocalPlayer = players.LocalPlayer
local Mouse = LocalPlayer:GetMouse()
local GUI = script.Parent
local PlayButton = GUI.PlayButton
local MOVE_SPEED = 150
local function UpdateCamera()
local Center = CameraPart.CFrame
local MoveVector = Vector3.new((Mouse.X - Center.X)/MOVE_SPEED, (Mouse.Y - Center.Y)/MOVE_SPEED, 0)
CurrentCamera.CFrame = CameraPart.CFrame * CFrame.Angles(math.rad(-(Mouse.Y - Center.Y)/MOVE_SPEED), math.rad(-(Mouse.X - Center.Y)/MOVE_SPEED), 0)
end
local Connection = RunService.RenderStepped:Connect(UpdateCamera)
PlayButton.Activated:Connect(function()
Connection:Disconnect()
GUI:Destroy()
end)