Hey there! This days I’ve been trying to learn about Cframes, and cameras, I’ve been also searching posts in the DevForum that could help me learning, but now I have a problem:
I’m using this for the camera
And I don’t figure out how to like when you press a Button GUI the camera returns to the player and the tilt disspears I’ve been trying adding to that script MouseButton1Click but don’t work maybe I’m doing something wrong, could someone help me?
local Players = game:GetService("Players")
local button = script.Parent
local localPlayer = Players.LocalPlayer
local function resetCameraSubject()
if workspace.CurrentCamera and localPlayer.Character then
local humanoid = localPlayer.Character:FindFirstChildOfClass("Humanoid")
if humanoid then
workspace.CurrentCamera.CameraSubject = humanoid
end
end
end
button.Activated:Connect(resetCameraSubject)
and this is the whole local script you’d be putting in the gui button