you still require to set the camera subject of it to the gunaimpart else it wont update the original CFrame unless its set to scriptable
i feel like this works better
script.Parent.SetCamera.OnClientEvent:Connect(function(inorout)
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
if inorout == "In" then
game.Workspace.CurrentCamera.CFrame = script.Parent.GunAim.CFrame
game.Workspace.CurrectCamera.CameraSubject = script.Parent.GunAim
game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
GunAim.Changed:Connect(function()
if game.Workspace.CurrentCamera.CameraSubject ~= hum then
game.Workspace.CurrentCamera.CFrame = script.Parent.GunAim.CFrame
else
return
end
end)
else
game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
game.Workspace.CurrentCamera.CameraSubject = hum
end
end)
also are you using chatgpt?
Please just stop using it as its not acurate. i dont need to explain myself here
i dont want to get anymore offtopic so @Trickzzs did it work?