I copied the script off of the github link and off of a youtube video I found on the subject, but for whatever reason the camera shake will not go off no matter what I do. Does anyone whos used ez camera shake know whats wrong?
local part = script.Parent
local repstorage = game:GetService("ReplicatedStorage")
local CameraShaker = require(game.repstorage.CameraShaker)
local camera = workspace.CurrentCamera
local function ShakeCamera(shakeCFrame)
-- shakeCf: CFrame value that represents the offset to apply for shake effect.
-- Apply the effect:
camera.CFrame = camera.CFrame * shakeCFrame
end
-- Create CameraShaker instance:
local renderPriority = Enum.RenderPriority.Camera.Value + 1
local camShake = CameraShaker.new(renderPriority, ShakeCamera)
-- Start the instance:
camShake:Start()
-- Apply explosion shakes every 5 seconds:
local touched = false
function touchedPart()
if not touched then
touched = true
camShake:Shake(CameraShaker.Presets.Explosion)
end
end
part.Touched:Connect(touchedPart)