Camera Dizziness

Hello

I made a simple dizziness script for my game, thought i would share with the community, feel free to make tweaks and leave or dont leave credit.

Get it from the Creator Store

--Settings in the video:

	amount = 1.5
	speed = 2

-- Place anywhere where a localscript could run.
-- (StarterGUI, StarterPlayerScripts, StarterCharacterScripts)

-- Made by zddeisRBLX (feel free to leave credit, or not if you dont want to)
-- Like the DevForum post (you like, me happy :D)


-- Hint: make the dizziness table a modulescript, so it
-- 		 can be acessed and changed by another localscript


local Camera = workspace.CurrentCamera

local dizziness = {
	amount = 2, -- (0-3)
	speed = 2,
}

game["Run Service"].RenderStepped:Connect(function(deltaTime)

	if dizziness.amount > 0 then
		
		local wobbleX = (math.sin(tick() * dizziness.speed) + math.sin(tick() * dizziness.speed * 1.3)) * dizziness.amount * 0.1
		local wobbleY = (math.cos(tick() * dizziness.speed * 0.8) + math.sin(tick() * dizziness.speed * 1.7)) * dizziness.amount * 0.1
		local wobbleZ = (math.sin(tick() * dizziness.speed * 1.5) * 0.5) * dizziness.amount * 0.05

		local currentCFrame = Camera.CFrame
		local rotation = CFrame.Angles(math.rad(wobbleX), math.rad(wobbleY), math.rad(wobbleZ))
		Camera.CFrame = currentCFrame * rotation
	end
end)
10 Likes