local c = workspace.CurrentCamera
local p = game.Players.LocalPlayer
workspace.ChildAdded:Connect(function(Child)
if Child:IsA("Explosion") then
Shake()
end
end)
function Shake()
for i = 1, 20 do
wait()
local RandomizerX = math.random(-70,70)
local RandomizerY = math.random(0,70)
local RandomizerZ = math.random(-70,70)
p.Character.Humanoid.CameraOffset = Vector3.new(math.rad(RandomizerX, 15, RandomizerZ))
end
p.Character.Humanoid.CameraOffset = Vector3.new(0,0,0)
end
It only changes the X axis, any fix?

1 comment
math.rad takes 1 argument, not 3. The other 2 arguments are ignored. Vector3.new takes 3 arguments and you only have 1 when you call it at line 17. Also, CameraOffset is specified in studs, not angles. It only changes the X axis because the only argument you have in Vector3.new is the first one, which specifies the X axis (X, Y, Z)