Issue with EZ Camera shake?

Hi, :wave: I just got the EZ camera shake module from free models and I had it being required from multiple scripts but it kept saying in output: image so I automatically figure it was because I was requiring it in multiple scripts. aha! easy fix, I thought to myself I can just use another module for scripts to require and it can be the only one tampering with the EZ cam shake module.

but there’s a little problem :sob:

every time I call a camera shake with :ShakeSustain() it sort of compounds the shake (it shakes the camera 2x as much as the last time) but idk why, please :pray: help a dude out. Thank you for reading!!

1 Like

Post the code that you are using to interface with CameraShaker…

1 Like

Yes, here’s that module I talked about that’s tampering with the CameraShaker.

local CameraShaker = require(game:GetService("ReplicatedStorage"):WaitForChild("CameraShaker"))
local camShake = CameraShaker.new(Enum.RenderPriority.Camera.Value, function(shakeCFrame)
		workspace.CurrentCamera.CFrame = workspace.CurrentCamera.CFrame * shakeCFrame
	end)

print("was required")

local camera = {}

function camera.shake(b)
	if (b) then
		camShake:Start()
		camShake:ShakeSustain(CameraShaker.Presets.RoughDriving)
	elseif not (b) then
		camShake:Stop()
	end
end

return camera

Here’s the place also, (click the red brick to see) I have 2 localscripts in StarterCharacterScripts that required this module
CameraShaker.rbxl (22.4 KB)

Hi there, this is my module. Well, technically Road Turtle Games made it originally (a team on the Unity platform).

From what I can see, it looks like you found a bug! When you call ā€œStopā€ on the module, it doesn’t actually remove the sustained shake from the list of ā€œactiveā€ shakes. Thus, when you call ā€œStartā€ again and another ā€œShakeSustainā€ call, it layers on another one.

I recently created a GitHub repo for this module, so I have opened up an issue for this. It’s Thanksgiving, so I won’t be working on this today, but I’ll get around to it soon.

2 Likes

Thanks for the reply, much appreciated. Happy thanksgiving!

1 Like