I’ve made it so when the player takes damage, a little camera shake will play.
Inside Roblox Studio it works fine, however when i tested it in the actual Roblox game, the camera shake was not noticeable at all, barely even visible.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local CameraShakeModule = require(ReplicatedStorage.OtherModules.CameraShaker)
local CameraShake = CameraShakeModule.new(Enum.RenderPriority.Camera.Value, function(shakeCF)
Camera.CFrame = Camera.CFrame * shakeCF
end)
CameraShake:Start()
PlayCameraShake.OnClientEvent:Connect(function(EffectName: string)
if CameraShake.Presets[EffectName] then
CameraShake:Shake(CameraShake.Presets[EffectName])
end
end)
I fire the event everytime I need to have the camera shake.
The module is probably unfortunately dependent of FPS. Not sure how to fix it unless you edit it using some “delta” time stuff but I’ve never tried this.
You’d confirm when changing your in-game fps while you’re in your game