hey. im trying to make a script with camera angles that allows you to activate a flashlight on all the camera angles. the remote events fire depending on which time of day it is, changing the way the camera acts. Here's the script I have:
local player = game.Players.LocalPlayer local mouse = player:GetMouse() local holdingRMB = false local uis = game:GetService("UserInputService") local camera = game.Workspace.CurrentCamera local daycamerapart = game.Workspace:WaitForChild("daycamerapart") local nightcamerapart = game.Workspace:WaitForChild("nightcamerapart") local dayevent = game.ReplicatedStorage.Remotes:WaitForChild("daycameraevent") local nightevent = game.ReplicatedStorage.Remotes:WaitForChild("nightcameraevent") local lighting = game.Lighting local lights = { light1 = game.Workspace.LightFolder.cameralight1 light2 = game.Workspace.LightFolder.cameralight2 light3 = game.Workspace.LightFolder.cameralight3 } uis.InputBegan:Connect(function(inputt, gameProcessedEvent, lightingProperty) if inputt.KeyCode == Enum.KeyCode.Space then local function lightingProperty(lighting, player) if lightingProperty.ClockTime == 0 * 6 then nightevent:FireClient(player) if lightingProperty.ClockTime == 7 * 14 then dayevent:FireClient(player) mouse.Button2Down:Connect(function() holdingRMB = true end) mouse.Button2Up:Connect(function() holdingRMB = false end) end end end end end) while true do if holdingRMB then light1.Enabled = true light2.Enabled = true light3.Enabled = true else light1.Enabled = false light2.Enabled = false light3.Enabled = false end end