Having a problem with EZ Camera Shake

Hello, i have a problem with EZ Camera Shake. For some reason when i am at studio it works normaly as it should do, but when i go to the server(on the roblox website not on studio), it shakes way too much for some reason and i cant find a solution.

Heres some videos i recorded:
On Studio


On Server

On the scripting side i used a server script to fire a remote event on all of the clients and shake their camera on a local script individually.

Heres the kind of function i used to shake their screen:

local CameraShake = require(game.ReplicatedStorage.Modules.Combat.CameraShake)
local camShake = CameraShake.new(Enum.RenderPriority.Camera.Value, function(shakeCf)
	game.Workspace.CurrentCamera.CFrame = game.Workspace.CurrentCamera.CFrame * shakeCf
end)
camShake:Start()

--When the Server remote fires
ServerEvent.OnClientEvent:Connect(function()
camShake:ShakeOnce(3, 5, 0.1, 0.2)
end)

How can i fix that?
Any Suggestion whould be greatly appreciated!!!

Could you please show the ShakeOnce Function?

Here:

function CameraShaker:ShakeOnce(magnitude, roughness, fadeInTime, fadeOutTime, posInfluence, rotInfluence)
	local shakeInstance = CameraShakeInstance.new(magnitude, roughness, fadeInTime, fadeOutTime)
	shakeInstance.PositionInfluence = (typeof(posInfluence) == "Vector3" and posInfluence or defaultPosInfluence)
	shakeInstance.RotationInfluence = (typeof(rotInfluence) == "Vector3" and rotInfluence or defaultRotInfluence)
	self._camShakeInstances[#self._camShakeInstances + 1] = shakeInstance
	return shakeInstance
end

Test it from studio on different resolutions. I think that might be the case here.

i tested on diffrent resolutions in studio and it doesnt have a problem there. i also dont think how that can help because the problem is on the server not on studio

I use the same library however this issue does not happen to me. Are you able to test this with one of the presets and still have the same issue? (i.e. Presets.Explosion)

The only thing I could really think of is the camera shaking more than once per event. Are you sure the script is not shaking the camera too many times per each trigger?

I tried to use the explotion preset but in server it shakes again way too much, also i whrited a line of code just bellow when the shake happens to print something so i can see how many times it printed if that was the case, but it printed only once. Can you show me what you have whritten so i can see if maybe the problem is that i made an error at the script?

You don’t have to use the explosion preset, that was just an example to test the consistency between your studio and a live server.

1Cj0Gk8
Using a fresh copy of EZ Camera Shake, there isn’t a difference I can notice. Here is the place file I used. Scripts located in ServerScriptService and StarterPlayer>StarterPlayerScripts

CameraShakeEvent.rbxl (41.8 KB)

EDIT: As someone has previously pointed out, this may vary based on resolution.

Well i think my problem is my resolution then:
Studio


Server

if thats the case then what am i supposed to do if people with the same resolution with me have this problem?

The results should still be consistent. I have further narrowed down your issue to potentially being a framerate problem. Are you using an FPS unlocker by chance?

yea i use, i literally stopped the proggram and now i am perfectly normal:

But this is not a solution because i am not the only one that uses an FPS unlocker

Yes, unfortunately, I am not able to help you further as this seems to be a bug with the module itself and others have been having the same issue as you, if you refer to the original thread. I’d recommend pointing out the issue to the creator.

I’m not sure that there is a solution without modifying the module code itself. I can only tell you that your code is correctly written as intended and it seems not to be the fault of your own.

Thanks for your help, i really appreaciate it!
I will try to contanct the creator.

1 Like