Firing click detector from local script?

So am just making this little game and… well I need to fire click detector from local script (if it is possible). If it is possible, can anyone tell me the function?

Right now this is the script. It goes through the parts and finds their click detector. Then server sided script does the other work.

mouse.KeyDown:Connect(function(key)
	if key == "z" then
		local origin = hrp.Position
		local direction = hrp.CFrame.LookVector * 30
		local raycastPara = RaycastParams.new()
		for i, v in pairs(players:GetPlayers()) do
			for _, mob in pairs(game.Workspace.Map:GetChildren()) do
				raycastPara.FilterDescendantsInstances = {v.Character, mob}
			end
		end
		raycastPara.FilterType = Enum.RaycastFilterType.Blacklist
		local result = workspace:Raycast(origin, direction, raycastPara)
		if result and result.Instance:FindFirstChildOfClass("ClickDetector") then
			print(result.Instance)
			game.Workspace.Interactables.Sign.Click.MouseClick()
                        -- Of course this couldn´t work because it is used to make functionality
		end
	end
end)

I recommend just listen for the click detector event from the server script, why do you want it in the local script anyway?

If player presses the Z key in front of the item, it shows the gui saying and etc.

You can just make a clickdetector event in a server-script as it returns a player variable. If you really want to use a localscript, you can use remote events.

Okey! Well then thank you for your support

You can just use a RemoteEvent, then FireClient whoever triggered it.