Script works in play solo but not on team test (Giving weird error)

I want my camera shake script to work
My camera shake works fine in play solo, but it gave me a weird error on team test.

I’ve tried re coding the script and it didn’t work

this was the error

THis is the code

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Workspace = game:GetService("Workspace")
local Players = game:GetService("Players")

local CameraShaker = require(ReplicatedStorage:WaitForChild("CameraShaker"))
local ShakeRemote = ReplicatedStorage:WaitForChild("ShakeRemote")

local Camera = Workspace.CurrentCamera

local LocalPlayer = Players.LocalPlayer

local CameraShake = CameraShaker.new(Enum.RenderPriority.Camera.Value, function(ShakeCFrame)
	Camera.CFrame = Camera.CFrame * ShakeCFrame
end)

CameraShake:Start()

ShakeRemote.OnClientEvent:Connect(function(Position)
	if (LocalPlayer.Character:WaitForChild("HumanoidRootPart").Position - Position).magnitude <= 50 then
		CameraShake:Shake(CameraShaker.Presets.Explosion)
	end
end)

It’s working fine and no error on play solo but when I play on team test I got this error

and when I click on the error, it showed this empty script

My script is a LocalScript and is in StarterPlayerScript

1 Like

I think you need to commit the script.

I am wanting to delete this but the forum functiosn duely want to work against me

the collaborative editing is turned off
, the script auto-commit too


that didn’t work, it showed error
Screen Shot 2564-10-28 at 8.15.25 PM

I sent wrong script and tried to delete it

Can you confirm you are using this camera shaker module?

@iUnstable0

I am using slietnick camera shake module
so the answer is Yes

I think it is due to the nature of how teamtest works, it is very weird. If it works in the simulation (not teamtest) and if you publish it and it works, there should be no problems. Probably a bug in teamtest.

1 Like

i think i fixed it by moving the script to StarterGui
.