Hi, 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: 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
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 help a dude out. Thank you for reading!!
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.