I am trying to make a camping game on roblox and I am trying to make a gui that shows the player because the camera is following the player and this is all i got for a camera block
local camera = workspace.CurrentCamera -- which is the camera local realcamera = workspace.Camerablock -- which is the camera block repeat wait() camera.CameraType = Enum.CameraType.Scriptable until camera.CameraType == Enum.CameraType.Scriptable camera.CFrame = realcamera.CFrame
But i need help because i don't know what i do to make it go in front of the player pls help me smart people
THis here will help you but make sure to be in R15 setting or it wont work
and make sure to add a HumanoidRootPart or this also wont work so add it to the script
local camera = game.Workspace.CurrentCamera local player = game.Players.LocalPlayer local runService = game:GetService('RunService') local pre, curr, diff local function setupCamera() wait() pre = player.Character:WaitForChild("UpperTorso").Position camera.CFrame = CFrame.new(pre+Vector3.new(0, 5, 10), pre) end local function onUpdate() if pre and player.Character and player.Character:FindFirstChild("UpperTorso") then curr = player.Character.UpperTorso.Position diff = curr - pre pre = curr camera.CFrame = camera.CFrame + diff end end player.CharacterAdded:connect(setupCamera) runService:BindToRenderStep("Camera",Enum.RenderPriority.Camera.Value,onUpdate)