--//Variables
local tool = script.Parent print(1)
local player = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local char = player.Character or player.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local db = false
--//Equipped
tool.Equipped:Connect(function(mouse) print(2)
mouse.Button1Down:Connect(function()
if not db then
db = true
game.ReplicatedStorage.ServerEvents.ShakeEvent:FireServer()print(3)
wait(4)
db = false
end
end)
end)
game.ReplicatedStorage.ServerEvents.ShakeEvent.OnClientEvent:Connect(function() print(4)
for i = 1,100 do
local a = math.random(-100,100)/100
local b = math.random(-100,100)/100
local c = math.random(-100,100)/100
hum.CameraOffset = Vector3.new(a,b,c)
wait()
end
end)
COMMUNITY QUESTION
What do i need to add to get the camera to reset and not end in a random place?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Your supposed to set it back the CameraOffset to normal after the loop that is creating the “shake” effect for your camera. A way to do this is to print the CameraOffset then take those values and assign it to the Humanoid when you are done your “shake” effect.