So, I am working on a button that changes your camera to the position of a brick. I put the local script in the click detector but it didn't work. No errors or anything, but here is my code.
local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded local Camera = workspace.CurrentCamera
script.Parent.MouseClick:Connect(function() repeat wait() Camera.CameraType = Enum.CameraType.Scriptable until Camera.CameraType == Enum.CameraType.Scriptable Camera.CFrame = workspace.CameraPart.CFrame end)
So, that's my code. Don't know what I did wrong, but yeah, any tips? Code would be helpful though.