Hello. My goal is to make my screen shake whenever I click but nothing seems to be working properly.
It only changes my CameraOffset once, but after that, it never moves. I’ve tried to ask other people but none have helped. I also tried to look at the Wiki for some information about the CameraOffset but nothing is helping. I’m pretty new to scripting tho.
local Player = game.Players.LocalPlayer
local Char = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Char.Humanoid
local Enabled = true
local Mouse = Player:GetMouse()
local x = math.random(-100,100)/100
local y = math.random(-100,100)/100
local z = math.random(-100,100)/100
if not Enabled then return end
Enabled = false
for i = 1, 20 do
Humanoid.CameraOffset = Vector3.new(x,y,z)
Humanoid.CameraOffset = Vector3.new(0,0,0)
Enabled = true