Hello Developers,
Today I wanted to scripting something like a brodcast camera into my game. So for example if your dead you can see what going on at the field. What I did right now is alright but the problem is everytime the CFrame of the part changes the camera just stays in place and I really need to fix that but I don’t know how. Please help me!
Camera Script:
local Player = game:GetService('Players').LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Camera = workspace.CurrentCamera
local GyroPart = workspace.Part
repeat wait()
Camera.CameraType = Enum.CameraType.Fixed
until Camera.CameraType == Enum.CameraType.Fixed
Camera.CFrame = GyroPart.CFrame
Camera.CameraSubject = GyroPart.CFrame
Gyro Script:
local Gyro = script.Parent:WaitForChild('BodyGyro')
local Camera = workspace.CurrentCamera
while true do
Gyro.CFrame = CFrame.new(Gyro.Parent.Position, workspace.anxlr.PrimaryPart.Position)
wait()
end