So I was making a table camera viewing where you view under tables. But for some unknown reasons, The camera offset won’t change.
local RunService = game:GetService("RunService")
local TableCamEvent = game.ReplicatedStorage.TableCamEvent
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local humanoid = char:FindFirstChild("Humanoid")
local isHiding = false
if char then return end
TableCamEvent.OnClientEvent:Connect(function()
if not isHiding and humanoid.Health >= 0 then
humanoid.CameraOffset = Vector3.new(0, -2, 0)
elseif isHiding then
humanoid.CameraOffset = Vector3.new(0, 0, 0)
end
isHiding = not isHiding
end)
Note that the code is a local script and a server-script fires the remote event.
have you tried print debugging or maybe just change the camera type to scriptable so you can add custom behaviour like changing the cframe if you want.