I want to make the players camera “glitch out” and look in random directions but I’m stuck on how to do so. I tried setting the players camera to scriptable (as others have suggested), but that just paused the players camera in mid air and detached the camera’s subject from the player.
Here is my code:
while player:GetAttribute("Smiling") do
StatusFrame:SetAttribute("CurrentTime", StatusFrame:GetAttribute("CurrentTime") - 0.1)
StatusFrame.EffectTime.Text = string.format("%." .. 1 .. "f", StatusFrame:GetAttribute("CurrentTime"))
local intensity = StatusFrame:GetAttribute("CurrentStack") / 10
local rng = math.random(1, 3)
if rng == 1 then
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = player.Character.HumanoidRootPart
cameraCFrame = cameraCFrame * CFrame.Angles(0, math.rad(10 * intensity), 0)
end
if StatusFrame:GetAttribute("CurrentTime") <= 0 then
StatusFrame:Destroy()
player:SetAttribute("Smiling", nil)
break
end
task.wait(0.1)
end
Setting the subject to the player doesn’t work either.