Starting at line 18, I need the camera to rotate around the player as it usually does, but instead of right clicking, the mouse is locked, and when the mouse is moved, the camera rotates.
wait(1) local plr = game.Players:GetPlayerFromCharacter(script.Parent) local chr = plr.Character local play = plr.PlayerGui.Customize.Frame.Play local mouse = plr:GetMouse() local cam = game.Workspace.CurrentCamera local rs = game:GetService("RunService") local uis = game:GetService("UserInputService") local editing = chr.Editing local frame = plr.PlayerGui.Customize.Frame local play = plr.PlayerGui.Customize.Frame.Play rs.RenderStepped:connect(function() if editing.Value == false then end end)
No need for RenderStepped.
local player = game:GetService("Players").LocalPlayer local editing = game.Workspace:WaitForChild(plr.Name):WaitForChild"Editing" local mouse = player:GetMouse() mouse.Move:Connect(function() -- It's Connect not connect. Coding is case sensitive if editing.Value == false then -- Do code end end)