Shake Camera during OnClientEvent

  1. What do you want to achieve? I’m trying to shake the player camera during an event or just “status effect”

  2. What is the issue? Camera only seems to shake when player respawns for whatever reason

  3. What solutions have you tried so far? Tried everything from a module script to Cameraoffset and still nothing

Keep in mind that the script is in StarterCharacter. along with the events

script.Parent.Events.BrainShock.OnClientEvent:Connect(function(IsOn)
	if IsOn == "ON" then
		game:GetService("TweenService"):Create(ShockColor, TweenInfo.new(2), {Size = 28}):Play()
		local bobble_X = math.cos(now * 1000) / 1000
		local bobble_Y = math.abs(math.sin(now * 1000)) / 1000
		local bobble = Vector3.new(bobble_X,bobble_Y,1000)
		humanoid.CameraOffset = humanoid.CameraOffset:lerp(bobble,.50)
			task.wait()
			df.Enabled = true -- this is just a lighting propriety..
elseif 
-- reverses everything that happened during "ON"
1 Like

Can you show the script that fires the remote event?

2 Likes

It’s found inside a tool and is triggerd and fire only to the player who got hit.

Target.Events.BrainShock:FireClient(CharactersPlayer, "ON") -- CharactersPlayer is Player derived from Target CharacterModel.

I’d like to see more of the code if you don’t mind.

Alright.
Player hits target and the event is fired to target
upon onclientevent
the target vision gets more blurry and the camera shakes however the camera does not seem to shake.
Well anyawys here is a cropped version

function DealDamage(Target,Damage,BonusTable,AttackInfo) -- AttackInfo is an optional argument.
	local CharactersPlayer = game.Players:GetPlayerFromCharacter(Target)
   local plrr = game.Players:GetPlayerFromCharacter(PlayerCharacter)
	if CharactersPlayer.Team ~= plrr.Team then 
		Target.Events.BrainShock:OnClientEvent(CharactersPlayer, "ON")
	if Target:FindFirstChildOfClass("Humanoid") ~= nil then

Yes i use fe melee kit for my stuff. (Mainly due to how versatile it is and reliant.)