How To Make A Menu With Moving Background Camera?

I was trying to make a moving camera menu for my hobby, but I can’t get how to make it?
I need help from you guys!
I made a camera but it doesn’t move.
gg.wmv (872.6 KB)

this should be on scripting support not development discussion

2 Likes

Use TweenService to move the camera.

1 Like

Oops sorry, I have changed it. Thank you for reminding me.

1 Like

Oh ok, I will try it out. Thank you for the suggestion.

b r u h
Screen Shot 2021-07-19 at 12.09.28 PM

1 Like

see it now I have uploaded a youtube video

1 Like

you can do something like this which I did in a recent module of mine

local TweenService = game:GetService("TweenService")

local plr = game:GetService("Players").LocalPlayer
local cameraTi = TweenInfo.new(0.5,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false)
local mouse = plr:GetMouse()
local lastMousePos = mouse.Hit.p
local camera = workspace.Camera
local camPart = workspace.CamPart

camera.CameraType = Enum.CameraType.Scriptable

while wait() do
	if mouse.Hit.p.X - lastMousePos.X > 0 then
		TweenService:Create(camera,cameraTi,{CFrame = camPart.CFrame + Vector3.new(5,0,0)}):Play()
	elseif mouse.Hit.p.X - lastMousePos.X < 0 then
		TweenService:Create(camera,cameraTi,{CFrame = camPart.CFrame - Vector3.new(5,0,0)}):Play()
	end

	lastMousePos = mouse.Hit.p
end


1 Like

Thanks, I will try using this!

1 Like